# Path where to work IPXE_DIRPATH="/opt/ipxe" # Create some directories mkdir -p "${IPXE_DIRPATH}/"{ipxe_project,builder} # Fetch iPXE source files cd "${IPXE_DIRPATH}/ipxe_project" git clone https://github.com/ipxe/ipxe.git . # Create the Docker builder image cd "${IPXE_DIRPATH}/builder" cat > ./Dockerfile <<'EOT' # Docker image to build ipxe files # # References: # * https://ipxe.org/download FROM debian:10.2 RUN \ apt-get --assume-yes --quiet update && \ apt-get --assume-yes --quiet --no-install-recommends install \ binutils \ build-essential \ gcc \ genisoimage \ git \ isolinux \ liblzma-dev \ make \ mtools \ perl \ syslinux \ syslinux-common \ && \ apt-get --assume-yes --quiet clean && \ apt-get --assume-yes --quiet autoremove && \ rm -rf /var/lib/apt/lists/* && \ true # No-op command to avoid "Empty continuation line" warning WORKDIR /ipxe_sources VOLUME /ipxe_sources CMD ["sh", "-c", "cd src && make"] EOT # Run it docker build -t "my_ipxe_builder" . docker run --rm -v "${IPXE_DIRPATH}/ipxe_project":/ipxe_sources my_ipxe_builder # It will create the following files in ${IPXE_DIRPATH}/ipxe_project/src : # * bin/ipxe.dsk # * bin/ipxe.lkrn # * bin/ipxe.iso # * bin/ipxe.usb # * bin/ipxe.pxe # * bin/undionly.kpxe