From fc38ab6f2d7092faf72b9e450bb21ea2890a462a Mon Sep 17 00:00:00 2001 From: thespad Date: Sun, 30 Jun 2024 13:47:54 +0100 Subject: [PATCH] Rebase to 3.20 --- Dockerfile | 3 ++- Dockerfile.aarch64 | 8 ++++++-- Jenkinsfile | 4 ++-- README.md | 35 ++++++++++++++++++++++++++++++++--- jenkins-vars.yml | 4 ++-- readme-vars.yml | 27 ++++++++++++--------------- 6 files changed, 56 insertions(+), 25 deletions(-) diff --git a/Dockerfile b/Dockerfile index d55191b..d9c550c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 -FROM ghcr.io/linuxserver/baseimage-alpine:3.19 +FROM ghcr.io/linuxserver/baseimage-alpine:3.20 # set version label ARG BUILD_DATE @@ -31,6 +31,7 @@ RUN \ echo "**** Permissions ****" && \ chown -R abc:abc \ /config && \ + printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ echo "**** cleanup ****" && \ rm -rf \ /tmp/* diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 8612ce3..fc593e6 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 -FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.19 +FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.20 # set version label ARG BUILD_DATE @@ -24,7 +24,11 @@ RUN \ ${DOWNURL}/netboot.xyz.efi && \ echo "**** Permissions ****" && \ chown -R abc:abc \ - /config + /config && \ + printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ + echo "**** cleanup ****" && \ + rm -rf \ + /tmp/* # add local files COPY /root / diff --git a/Jenkinsfile b/Jenkinsfile index 65f024c..39d450d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -34,8 +34,8 @@ pipeline { CI_PORT='69' CI_SSL='false' CI_DELAY='60' - CI_DOCKERENV='TZ=US/Pacific' - CI_AUTH='user:password' + CI_DOCKERENV='' + CI_AUTH='' CI_WEBPATH='' } stages { diff --git a/README.md b/README.md index 5e7fed2..791cdc6 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ To use this image you need an existing DHCP server where you can set this TFTP s #### PFSense Services -> DHCP Server -Set both the option for \"TFTP Server\" and the options under the Advanced \"Network Booting\" section. +Set both the option for \"TFTP Server\" and the options under the Advanced \"Network Booting\" section. * check enable * Next server- IP used for TFTP Server * Default BIOS file name- `netboot.xyz.kpxe` @@ -76,7 +76,7 @@ Set both the option for \"TFTP Server\" and the options under the Advanced \"Net #### OPNsense Services -> DHCP Server -Under the Advanced \"Network Booting\" section. +Under the Advanced \"Network Booting\" section. * check enable * Next server- IP of docker host * Default BIOS file name- `netboot.xyz.kpxe` @@ -116,7 +116,7 @@ commit; save #### Dnsmasq/DD-WRT/Tomato/PIHOLE Various locations to set Additional/Custom DNSMASQ options in UI or config files -Set the following lines: +Set the following lines: ``` dhcp-match=set:bios,60,PXEClient:Arch:00000 dhcp-boot=tag:bios,netboot.xyz.kpxe,,YOURSERVERIP @@ -176,6 +176,10 @@ services: netbootxyz: image: lscr.io/linuxserver/netbootxyz:tftp container_name: netbootxyz + environment: + - PUID=1000 + - PGID=1000 + - TZ=Etc/UTC ports: - 69:69/udp restart: unless-stopped @@ -186,6 +190,9 @@ services: ```bash docker run -d \ --name=netbootxyz \ + -e PUID=1000 \ + -e PGID=1000 \ + -e TZ=Etc/UTC \ -p 69:69/udp \ --restart unless-stopped \ lscr.io/linuxserver/netbootxyz:tftp @@ -198,6 +205,9 @@ Containers are configured using parameters passed at runtime (such as those abov | Parameter | Function | | :----: | --- | | `-p 69/udp` | TFTP Port. | +| `-e PUID=1000` | for UserID - see below for explanation | +| `-e PGID=1000` | for GroupID - see below for explanation | +| `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). | ## Environment variables from files (Docker secrets) @@ -216,6 +226,24 @@ Will set the environment variable `MYVAR` based on the contents of the `/run/sec For all of our images we provide the ability to override the default umask settings for services started within the containers using the optional `-e UMASK=022` setting. Keep in mind umask is not chmod it subtracts from permissions based on it's value it does not add. Please read up [here](https://en.wikipedia.org/wiki/Umask) before asking for support. +## User / Group Identifiers + +When using volumes (`-v` flags), permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user `PUID` and group `PGID`. + +Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic. + +In this instance `PUID=1000` and `PGID=1000`, to find yours use `id your_user` as below: + +```bash +id your_user +``` + +Example output: + +```text +uid=1000(your_user) gid=1000(your_user) groups=1000(your_user) +``` + ## Docker Mods [![Docker Mods](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=netbootxyz&query=%24.mods%5B%27netbootxyz%27%5D.mod_count&url=https%3A%2F%2Fraw.githubusercontent.com%2Flinuxserver%2Fdocker-mods%2Fmaster%2Fmod-list.yml)](https://mods.linuxserver.io/?mod=netbootxyz "view available mods for this container.") [![Docker Universal Mods](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=universal&query=%24.mods%5B%27universal%27%5D.mod_count&url=https%3A%2F%2Fraw.githubusercontent.com%2Flinuxserver%2Fdocker-mods%2Fmaster%2Fmod-list.yml)](https://mods.linuxserver.io/?mod=universal "view available universal mods.") @@ -342,6 +370,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **30.06.24:** - Rebase to Alpine 3.20. * **08.12.23:** - Rebase tftp branch to Alpine 3.19. * **17.11.23:** - Rebase tftp branch to Alpine 3.18. * **01.07.23:** - Deprecate armhf. As announced [here](https://www.linuxserver.io/blog/a-farewell-to-arm-hf) diff --git a/jenkins-vars.yml b/jenkins-vars.yml index cf67df4..1cfc4e3 100644 --- a/jenkins-vars.yml +++ b/jenkins-vars.yml @@ -24,8 +24,8 @@ repo_vars: - CI_PORT='69' - CI_SSL='false' - CI_DELAY='60' - - CI_DOCKERENV='TZ=US/Pacific' - - CI_AUTH='user:password' + - CI_DOCKERENV='' + - CI_AUTH='' - CI_WEBPATH='' sponsor_links: - { name: "netboot.xyz", url: "https://opencollective.com/netbootxyz/donate" } diff --git a/readme-vars.yml b/readme-vars.yml index 16f9385..c3cb2b4 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -11,14 +11,10 @@ available_architectures: - {arch: "{{ arch_x86_64 }}", tag: "amd64-latest"} - {arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"} # container parameters -common_param_env_vars_enabled: false param_container_name: "{{ project_name }}" -param_usage_include_vols: false param_usage_include_ports: true param_ports: - {external_port: "69", internal_port: "69/udp", port_desc: "TFTP Port."} -param_usage_include_env: false -# application setup block app_setup_block_enabled: true app_setup_block: | To use this image you need an existing DHCP server where you can set this TFTP server as your DHCP boot destination. This image does not contain a DHCP server nor do we aim to support one in the future. This is simply a TFTP server hosting the latest IPXE kernel builds from [netboot.xyz]({{ project_url }}). If you are interested in their project and lack the ability to setup a DHCP server to boot this payload they also have USB stick images you can use available on their [downloads page]({{ project_url }}/downloads/). @@ -28,7 +24,7 @@ app_setup_block: | #### PFSense Services -> DHCP Server - Set both the option for \"TFTP Server\" and the options under the Advanced \"Network Booting\" section. + Set both the option for \"TFTP Server\" and the options under the Advanced \"Network Booting\" section. * check enable * Next server- IP used for TFTP Server * Default BIOS file name- `netboot.xyz.kpxe` @@ -38,7 +34,7 @@ app_setup_block: | #### OPNsense Services -> DHCP Server - Under the Advanced \"Network Booting\" section. + Under the Advanced \"Network Booting\" section. * check enable * Next server- IP of docker host * Default BIOS file name- `netboot.xyz.kpxe` @@ -55,7 +51,7 @@ app_setup_block: | EdgeOS (shown below) will fully support netboot. * For UDM variants, creating a valid dnsmasq config and placing in /run/dnsmasq.conf.d will load the config, but will not survive reboots or firmware updates [source](https://community.ui.com/questions/PXE-Network-boot-UDM-SE-Serving-files-conditionally-based-on-architecture/1843fcf6-87d5-4305-bc1d-4e55619ebb10). - + #### EdgeOS/VyOS Connect via SSH ``` @@ -75,10 +71,10 @@ app_setup_block: | set service dns forwarding options \"dhcp-boot=tag:efi64-2,netboot.xyz.efi,,SERVERIP\" commit; save ``` - + #### Dnsmasq/DD-WRT/Tomato/PIHOLE Various locations to set Additional/Custom DNSMASQ options in UI or config files - Set the following lines: + Set the following lines: ``` dhcp-match=set:bios,60,PXEClient:Arch:00000 dhcp-boot=tag:bios,netboot.xyz.kpxe,,YOURSERVERIP @@ -93,7 +89,7 @@ app_setup_block: | dhcp-match=set:efi64-2,60,PXEClient:Arch:00009 dhcp-boot=tag:efi64-2,netboot.xyz.efi,,YOURSERVERIP ``` - + #### OpenWRT ``` uci set dhcp.@dnsmasq[0].dhcp_match=set:bios,60,PXEClient:Arch:00000 @@ -111,9 +107,9 @@ app_setup_block: | uci commit /etc/init.d/dnsmasq restart ``` - + #### Microsoft Server DHCP - + * Run the DHCP program * Under Scope/Scope Options * check option 066 and enter the FQDN or IP of your TFTP boot server @@ -121,13 +117,14 @@ app_setup_block: | * Default BIOS file name- netboot.xyz.kpxe * UEFI 32 bit file name- netboot.xyz.efi * UEFI 64 bit file name- netboot.xyz.efi - + Anything else from a router standpoint is a crapshoot for supporting Dnsmasq options or proprietary PXE boot options, check Google for support (try your exact router model number with 'pxe boot') or look into setting up your own DHCP server in Linux. - - This image also contains `netboot.xyz.efi` which can be used to boot using UEFI network boot. The UEFI boot and menu will have limited functionality if you choose to use it. + + This image also contains `netboot.xyz.efi` which can be used to boot using UEFI network boot. The UEFI boot and menu will have limited functionality if you choose to use it. # changelog changelogs: + - {date: "30.06.24:", desc: "Rebase to Alpine 3.20."} - {date: "08.12.23:", desc: "Rebase tftp branch to Alpine 3.19."} - {date: "17.11.23:", desc: "Rebase tftp branch to Alpine 3.18."} - {date: "01.07.23:", desc: "Deprecate armhf. As announced [here](https://www.linuxserver.io/blog/a-farewell-to-arm-hf)"}