You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
723 B
27 lines
723 B
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"]
|
|
|