{"id":22558988,"url":"https://github.com/m1cr0man/docker-netbooter","last_synced_at":"2025-08-26T07:08:22.416Z","repository":{"id":38288535,"uuid":"182516470","full_name":"m1cr0man/docker-netbooter","owner":"m1cr0man","description":"Provides DHCP, TFTP and HTTP with embedded iPXE ROMs","archived":false,"fork":false,"pushed_at":"2023-06-30T21:39:35.000Z","size":14,"stargazers_count":4,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-08-26T04:39:46.633Z","etag":null,"topics":["alpine-linux","netboot","pxe"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/m1cr0man/netbooter","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/m1cr0man.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-21T09:52:16.000Z","updated_at":"2023-08-26T04:39:46.634Z","dependencies_parsed_at":"2022-08-25T02:40:56.523Z","dependency_job_id":null,"html_url":"https://github.com/m1cr0man/docker-netbooter","commit_stats":null,"previous_names":[],"tags_count":2,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m1cr0man%2Fdocker-netbooter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m1cr0man%2Fdocker-netbooter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m1cr0man%2Fdocker-netbooter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m1cr0man%2Fdocker-netbooter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m1cr0man","download_url":"https://codeload.github.com/m1cr0man/docker-netbooter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228652837,"owners_count":17952041,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alpine-linux","netboot","pxe"],"created_at":"2024-12-07T20:18:30.247Z","updated_at":"2024-12-07T20:18:30.981Z","avatar_url":"https://github.com/m1cr0man.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker Alpine Netboot Server\n\n![Docker Automated build](https://img.shields.io/docker/automated/m1cr0man/netbooter.svg)\n![Docker Pulls](https://img.shields.io/docker/pulls/m1cr0man/netbooter.svg)\n\nProvides everything you need to PXE boot any machine (BIOS/UEFI).\n\nNon-iPXE booting machines will be \"upgraded\" to iPXE.\n\nContains a TFTP, DHCP and HTTP server. The HTTP server runs on port 8069\nby default for safe usage with other services using port 80.\n\nSupports running a DHCP server in authoritative, proxy and disabled modes.\n\n## Example usage\n\n- Create a folder to store your boot images and `menu.ipxe` file. There is\nan [example menu.ipxe](https://github.com/m1cr0man/docker-netbooter/blob/master/httproot/menu.ipxe) in the repo.\n- Run the container:\n\n```bash\ndocker run --rm -d --net host --cap-add NET_ADMIN --name=netbooter -v /path/to/httproot:/netboot/httproot \\\n  -e DHCPMODE=authoritative \\\n  -e DOMAINNAME=localdomain \\\n  -e DNSSERVERS=\"1.1.1.1,192.168.56.1\" \\\n  -e GATEWAY=192.168.56.1 \\\n  -e NETMASK=255.255.255.0 \\\n  -e NETPREFIX=192.168.56 \\\n  -e RANGESTART=50 \\\n  -e RANGEEND=100 \\\n  m1cr0man/netbooter:latest\n```\n\nFor more examples, check out the [Makefile](./Makefile).\n\n## Which DHCP mode is right for you?\n\nWhen configuring netboot for the first time, DHCP configuration can\nbe very confusing. There are a lot of different ways to configure it\nand all of them depend on your particular situation.\n\n### Authoritative DHCP\n\nUse this mode if you want the DHCP server in this container to serve leases\nin the configured network. For example, if you are trying to netboot a virtual\nmachine or physical machine on a network interface with no other DHCP servers\nconfigured.\n\nEnvironment variables:\n\n- `DHCPMODE`: Must be set to `authoritative`.\n- `DOMAINNAME`: Domain to pass to clients via DHCP.\n- `DNSSERVERS`: (Optional) Comma separated list of DNS servers.\n- `GATEWAY`: (Optional) Network gateway to provide to clients. Will default to server's IP.\n- `NETMASK`: (Optional) Netmask to provide to clients. Defaults to `255.255.255.0`.\n- `NETPREFIX`: The first 3 digits of the IPv4 address range you want to serve. No trailing dot.\n- `RANGESTART`: The first IP address to serve. Prefixed with the `NETPREFIX`.\n- `RANGEEND`: The last IP address to serve. Prefixed with the `NETPREFIX`.\n\n### Proxy DHCP\n\nUse this mode if there is another DHCP server on your network which you cannot\nreconfigure to support network booting. For example, you want to netboot a host\non your home network and the router already serves DHCP leases itself.\n\nEnvironment variables:\n\n- `DHCPMODE`: Must be set to `proxy`.\n- `NETPREFIX`: The first 3 digits of the IPv4 address range you want to serve. No trailing dot.\n- `RANGESTART`: The first address of the network to serve requests on. Usually `1`.\n- `NETMASK`: (Optional) Netmask to serve requests on. Defaults to `255.255.255.0`.\n\n### No DHCP\n\nYou can disable the DHCP feature of this image entirely if you already have\na DHCP server on your network and can configure it to serve the correct PXE\nboot options. For example, you have another Linux/Windows DHCP server that\nyou have root/administrator access to, and you just need a TFTP + IPXE server.\n\nIn this case, you can exclude all environment variables except for `DHCPMODE`.\n\nEnvironment variables:\n\n- `DHCPMODE`: Must be set to `none`.\n\n## Example docker-compose.yml\n\n```yml\nversion: '3.4'\nservices:\n  netbooter:\n    image: m1cr0man/netbooter:latest\n    restart: always\n    network: host\n    cap_add:\n      - NET_ADMIN\n    environment:\n      DHCPMODE: authoritative\n      DOMAINNAME: localdomain\n      DNSSERVERS: 1.1.1.1,192.168.56.1\n      GATEWAY: 192.168.56.1\n      NETMASK: 255.255.255.0\n      NETPREFIX: 192.168.56\n      RANGESTART: 50\n      RANGEEND: 100\n    volumes:\n      - ./path/to/httproot:/netboot/httproot:ro\n```\n\n## Adding images\n\n- Download the necessary netboot files for the image you want to use (e.g. initrd + vmlinuz)\n- Copy these files to your `httproot` folder\n- Add a section to your `menu.ipxe` to provide an option to select this OS. The example\nmenu.ipxe includes a section for Rancher OS installer which you can copy/edit.\n\nFor more information on writing the `menu.ipxe` see [the iPXE docs](https://ipxe.org/scripting)\n\n## Usage from Github\n\nA Makefile is provided for conveniently building + running the container.\nSimply run `make` to do both, or run `make [build|run]` for the individual parts.\n\nIt is recommended to edit the `run` target to suit your own environment/needs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm1cr0man%2Fdocker-netbooter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm1cr0man%2Fdocker-netbooter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm1cr0man%2Fdocker-netbooter/lists"}