From 499dd397be4c00048613be2294976c82045c1c1b Mon Sep 17 00:00:00 2001 From: Khue Doan Date: Fri, 23 Jul 2021 13:50:33 +0700 Subject: [PATCH] Use volume for PXE config files --- metal/roles/pxe-server/templates/dhcp/Dockerfile | 2 -- metal/roles/pxe-server/templates/docker-compose.yml | 3 +++ metal/roles/pxe-server/templates/tftp/Dockerfile | 2 -- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/metal/roles/pxe-server/templates/dhcp/Dockerfile b/metal/roles/pxe-server/templates/dhcp/Dockerfile index 38bb0713..0870e4a6 100644 --- a/metal/roles/pxe-server/templates/dhcp/Dockerfile +++ b/metal/roles/pxe-server/templates/dhcp/Dockerfile @@ -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" ] diff --git a/metal/roles/pxe-server/templates/docker-compose.yml b/metal/roles/pxe-server/templates/docker-compose.yml index d4061f08..dcacf065 100644 --- a/metal/roles/pxe-server/templates/docker-compose.yml +++ b/metal/roles/pxe-server/templates/docker-compose.yml @@ -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 diff --git a/metal/roles/pxe-server/templates/tftp/Dockerfile b/metal/roles/pxe-server/templates/tftp/Dockerfile index 4f02514a..5d632ac4 100644 --- a/metal/roles/pxe-server/templates/tftp/Dockerfile +++ b/metal/roles/pxe-server/templates/tftp/Dockerfile @@ -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" ]