This container starts a DHCP server and a TFTP server which can be used for booting boards through PXE. 1. Build the container - cd into this folder - run: docker build . -t 2. Start a container with both the DHCP server and TFTP server configured for PXE booting: - 4 files are needed: - dhcpd.conf - configuration file for the DHCP server (an example is provided in the git repository) - pxe.cfg - configuration file for the PXE server (an example is provided in the git repository) - bzImage - kernel for the board - rootfs.ext4 - root filesystem for the board - Edit dhcpd.conf to match the DHCP server configuration that is needed - Set an IP address to the interface (named INTERFACE_NAME below) where the DHCP server will be advertised on - Run: docker run -it --net=host --privileged \ -v :/etc/dhcp/dhcpd.conf \ -v :/var/lib/tftpboot/pxelinux.cfg/default \ -v :/var/lib/tftpboot/bzImage \ -v :/var/lib/tftpboot/rootfs.ext4 \ Given that all the required files are in the current working directory and that the container is named "nfv-pxe-boot", a practical example for running on eth2 would be: docker run -it --net=host --privileged \ -v $(pwd)/dhcpd.conf:/etc/dhcp/dhcpd.conf \ -v $(pwd)/pxe.cfg:/var/lib/tftpboot/pxelinux.cfg/default \ -v $(pwd)/bzImage:/var/lib/tftpboot/bzImage \ -v $(pwd)/rootfs.ext4:/var/lib/tftpboot/rootfs.ext4 \ nfv-pxe-boot eth2 The -v parameter mounts a file specified at the left of the colon character to the destination specified at the right of the colon character. For example "-v $(pwd)/bzImage:/var/lib/tftpboot/bzImage" evaluates $(pwd)/bzImage and will map the file to /var/lib/tftpboot/bzImage in the container. Boot the board with network booting enabled and it should load the configuration set in pxe.cfg. 3. Start a container with only the DHCP server running: - Only dhcpd.conf is needed - Set an IP address to the interface (named INTERFACE_NAME below) where the DHCP server will be advertised on - Run: docker run -it --net=host --privileged -v :/etc/dhcp/dhcpd.conf