2022-07-24 22:09:34 +01:00
|
|
|
FROM alpine:3.16 as build-ipxe
|
|
|
|
|
|
|
|
WORKDIR /build
|
|
|
|
RUN apk add --no-cache git make gcc musl-dev perl xz-dev
|
|
|
|
|
|
|
|
RUN git clone https://github.com/ipxe/ipxe.git
|
|
|
|
WORKDIR /build/ipxe/src
|
|
|
|
RUN git checkout d72c8fdc902bc5d605fef081a18f6fe84f3d0512
|
|
|
|
|
|
|
|
RUN sed -i 's/#define\tKEYBOARD_MAP\tus/#define\tKEYBOARD_MAP\tuk/g' config/console.h
|
|
|
|
RUN sed -i 's/\/\/#define REBOOT_CMD/#define REBOOT_CMD/g' config/general.h
|
|
|
|
RUN sed -i 's/\/\/#define POWEROFF_CMD/#define POWEROFF_CMD/g' config/general.h
|
|
|
|
RUN sed -i 's/\/\/#define PARAM_CMD/#define PARAM_CMD/g' config/general.h
|
|
|
|
|
|
|
|
COPY embed.ipxe /build/
|
|
|
|
|
|
|
|
RUN make -j8 bin/undionly.kpxe EMBED=/build/embed.ipxe
|
|
|
|
RUN make -j8 bin/ipxe.kpxe EMBED=/build/embed.ipxe
|
|
|
|
RUN make -j8 bin/ipxe.lkrn EMBED=/build/embed.ipxe
|
|
|
|
|
|
|
|
|
2022-07-24 16:37:47 +01:00
|
|
|
FROM alpine:3.16
|
|
|
|
|
|
|
|
RUN apk add --no-cache dnsmasq
|
2022-07-24 22:09:34 +01:00
|
|
|
|
|
|
|
RUN mkdir /tftp && echo -e "\
|
2022-07-24 16:37:47 +01:00
|
|
|
port=0\n\
|
|
|
|
enable-tftp\n\
|
|
|
|
tftp-root=/tftp\
|
|
|
|
" > /etc/dnsmasq.conf
|
|
|
|
|
2022-07-24 22:09:34 +01:00
|
|
|
COPY --from=build-ipxe /build/ipxe/src/bin/undionly.kpxe /tftp/
|
|
|
|
COPY --from=build-ipxe /build/ipxe/src/bin/ipxe.kpxe /tftp/
|
|
|
|
COPY --from=build-ipxe /build/ipxe/src/bin/ipxe.lkrn /tftp/
|
|
|
|
|
2022-07-24 16:37:47 +01:00
|
|
|
EXPOSE 69/udp
|
|
|
|
|
2022-07-24 17:06:21 +01:00
|
|
|
ENTRYPOINT [ "dnsmasq", "--no-daemon" ]
|
|
|
|
CMD [ "" ]
|