Use volume for PXE config files

This commit is contained in:
Khue Doan 2021-07-23 13:50:33 +07:00
parent daeeebae56
commit 499dd397be
No known key found for this signature in database
GPG Key ID: 4C1A90A461B3C27B
3 changed files with 3 additions and 4 deletions

View File

@ -4,6 +4,4 @@ RUN apk add dhcp
RUN touch /var/lib/dhcp/dhcpd.leases
COPY dhcpd.conf /etc/dhcp/dhcpd.conf
CMD [ "dhcpd", "-f", "-cf", "/etc/dhcp/dhcpd.conf" ]

View File

@ -3,11 +3,14 @@ version: "3"
services:
dhcp:
build: ./dhcp
volumes:
- ./dhcp/dhcpd.conf:/etc/dhcp/dhcpd.conf
network_mode: host
tftp:
build: ./tftp
network_mode: host
volumes:
- ./tftp/tftpboot/grub.cfg:/var/lib/tftpboot/grub.cfg
- ./mnt/EFI/fedora/grubx64.efi:/var/lib/tftpboot/grubx64.efi
- ./mnt/images/ignition.img:/var/lib/tftpboot/ignition.img
- ./mnt/images/pxeboot/initrd.img:/var/lib/tftpboot/initrd.img

View File

@ -2,6 +2,4 @@ FROM alpine:3
RUN apk add tftp-hpa
COPY ./tftpboot /var/lib/tftpboot
CMD [ "in.tftpd", "--foreground", "--secure", "/var/lib/tftpboot" ]