1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-23 01:39:27 +02:00
dockerfiles/dnsmasq/pxe/README.md

52 lines
1013 B
Markdown
Raw Normal View History

2016-06-20 15:33:42 +02:00
pxe
===
The Preboot Execution Environment (PXE) is an environment to bootstrap
computers using a network card (i.e Ethernet, Token-Ring) independently of
available data storage devices (like hard disks) or installed operating
systems.
## docker-compose.yml
```yaml
pxe:
image: vimagick/dnsmasq
volumes:
- ./dnsmasq.conf:/etc/dnsmasq.d/dnsmasq.conf
- ./tftpboot:/tftpboot
net: host
restart: always
```
## dnsmasq.conf
```
interface=eth0
port=0
no-hosts
no-resolv
server=8.8.8.8
dhcp-range=192.168.1.10,192.168.1.20,1h
dhcp-option=3,192.168.1.1
dhcp-option=6,192.168.1.1
dhcp-boot=pxelinux.0
enable-tftp
tftp-root=/tftpboot
```
> You can get all `dhcp-option` codes via `dnsmasq --help dhcp`.
## up and running
```bash
cd ~/fig/pxe/
mkdir tftpboot
wget http://ftp.nl.debian.org/debian/dists/jessie/main/installer-amd64/current/images/netboot/netboot.tar.gz
tar xzf netboot.tar.gz -C tftpboot
docker-compose up -d
docker-compose logs -f
```
> You should stop DHCP service on local network.