Sign inSign up

m1cr0man/netbooter

By m1cr0man

•Updated over 4 years ago

Provides DHCP, TFTP and HTTP with embedded iPXE ROMs

Image
0

1.1K

m1cr0man/netbooter repository overview

⁠Docker Alpine Netboot Server

Docker Automated build Docker Pulls

Provides everything you need to PXE boot any machine (BIOS/UEFI).

Non-iPXE booting machines will be "upgraded" to iPXE.

Contains a TFTP, DHCP and HTTP server. The HTTP server runs on port 8069 by default for safe usage with other services using port 80. The DHCP server can be disabled.

⁠Example usage

  • Create a folder to store your boot images and menu.ipxe file. There is an example menu.ipxe⁠ in the repo.
  • Run the container:
docker run --rm -d --net host --name=netbooter -v /path/to/httproot:/netboot/httproot \
	-e DOMAINNAME=localdomain \
	-e DNSSERVERS="8.8.8.8,192.168.56.1" \
	-e NETPREFIX=192.168.56 \
	-e RANGESTART=50 \
	-e RANGEEND=100 \
	m1cr0man/netbooter:latest

Note: If you want to use your own DHCP server just don't specify the environment variables.

⁠Example docker-compose.yml

version: '3.4'
services:
  netbooter:
    image: m1cr0man/netbooter:latest
    restart: always
    network: host
    environment:
      DOMAINNAME: localdomain
      DNSSERVERS: 8.8.8.8,192.168.56.1
      NETPREFIX: 192.168.56
      RANGESTART: 50
      RANGEEND: 100
    volumes:
      - ./path/to/httproot:/netboot/httproot:ro

⁠Configuration options

Environment variables:

  • DOMAINNAME: Domain to pass to clients via DHCP
  • DNSSERVERS: Comma separated list of DNS servers
  • NETPREFIX: The first 3 digits of the IPv4 address range you want to serve. No trailing dot.
  • RANGESTART: The first IP address to serve. Prefixed with the NETPREFIX
  • RANGEEND: The last IP address to serve. Prefixed with the NETPREFIX

Leave these settings out to disable the DHCP server.

⁠Adding images

  • Download the necessary netboot files for the image you want to use (e.g. initrd + vmlinuz)
  • Copy these files to your httproot folder
  • Add a section to your menu.ipxe to provide an option to select this OS. The example menu.ipxe includes a section for Rancher OS installer which you can copy/edit.

For more information on writing the menu.ipxe see the iPXE docs⁠

⁠Usage from Github

A Makefile is provided for conveniently building + running the container. Simply run make to do both, or run make [build|run] for the individual parts.

It is recommended to edit the run target to suit your own environment/needs.

Tag summary

Content type

Image

Digest

Size

9.3 MB

Last updated

over 7 years ago

docker pull m1cr0man/netbooter