Build iPXE and add to Docker image.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
5f299c4671
commit
4a18683362
29
Dockerfile
29
Dockerfile
|
@ -1,14 +1,39 @@
|
|||
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
|
||||
|
||||
|
||||
FROM alpine:3.16
|
||||
|
||||
RUN apk add --no-cache dnsmasq
|
||||
RUN echo -e "\
|
||||
|
||||
RUN mkdir /tftp && echo -e "\
|
||||
port=0\n\
|
||||
enable-tftp\n\
|
||||
tftp-root=/tftp\
|
||||
" > /etc/dnsmasq.conf
|
||||
|
||||
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/
|
||||
|
||||
EXPOSE 69/udp
|
||||
VOLUME [ "/tftp" ]
|
||||
|
||||
ENTRYPOINT [ "dnsmasq", "--no-daemon" ]
|
||||
CMD [ "" ]
|
|
@ -0,0 +1,4 @@
|
|||
#!ipxe
|
||||
|
||||
dhcp
|
||||
chain http://185.234.74.200/chain.ipxe
|
Loading…
Reference in New Issue