parent
059fb16ac9
commit
3155b8a464
@ -0,0 +1,27 @@ |
|||||||
|
FROM debian:buster |
||||||
|
|
||||||
|
RUN apt update |
||||||
|
RUN apt install -y make debootstrap supervisor isc-dhcp-server tftpd-hpa busybox squashfs-tools |
||||||
|
|
||||||
|
# Linux image |
||||||
|
ADD linux /linux |
||||||
|
RUN mkdir -p linux/build && debootstrap buster linux/build/cache |
||||||
|
RUN cd /linux && make |
||||||
|
|
||||||
|
# Files to be served |
||||||
|
ADD files /tftpboot |
||||||
|
RUN cp /linux/build/rootfs/initrd.img /tftpboot/initrd.img && \ |
||||||
|
cp /linux/build/rootfs/vmlinuz /tftpboot/vmlinuz && \ |
||||||
|
mksquashfs /linux/build/rootfs /tftpboot/root.squashfs |
||||||
|
|
||||||
|
# Supervisor |
||||||
|
COPY src/supervisor.conf /supervisor.conf |
||||||
|
|
||||||
|
# DHCP server |
||||||
|
RUN mkdir -p /var/lib/dhcp && touch /var/lib/dhcp/dhcpd.leases |
||||||
|
COPY src/dhcpd.conf /etc/dhcp/dhcpd.conf |
||||||
|
|
||||||
|
COPY src/run.sh /run.sh |
||||||
|
RUN chmod +x /run.sh |
||||||
|
ENV INTERFACE=eth0 |
||||||
|
CMD ["/run.sh"] |
||||||
@ -1,19 +0,0 @@ |
|||||||
FROM debian:buster |
|
||||||
|
|
||||||
RUN apt update |
|
||||||
RUN apt install -y supervisor |
|
||||||
RUN apt install -y isc-dhcp-server |
|
||||||
RUN apt install -y tftpd-hpa |
|
||||||
RUN apt install -y busybox |
|
||||||
|
|
||||||
# Supervisor |
|
||||||
COPY supervisor.conf /supervisor.conf |
|
||||||
|
|
||||||
# DHCP server |
|
||||||
RUN mkdir -p /var/lib/dhcp && touch /var/lib/dhcp/dhcpd.leases |
|
||||||
COPY dhcpd.conf /etc/dhcp/dhcpd.conf |
|
||||||
|
|
||||||
COPY run.sh /run.sh |
|
||||||
RUN chmod +x /run.sh |
|
||||||
ENV INTERFACE=eth0 |
|
||||||
CMD ["/run.sh"] |
|
||||||
Loading…
Reference in new issue