Skip to content

Commit

Permalink
[WIP] testing multi-stage images
Browse files Browse the repository at this point in the history
  • Loading branch information
elfosardo committed Dec 4, 2019
1 parent 27f6b3a commit f0d6392
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion Dockerfile.ocp
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
FROM openshift/origin-base AS builder

RUN yum install -y gcc git make genisoimage xz-devel grub2 grub2-efi-x64 shim dosfstools mtools

RUN dd bs=1024 count=2880 if=/dev/zero of=esp.img && \
mkfs.msdos -F 12 -n 'ESP_IMAGE' ./esp.img && \
mmd -i esp.img EFI && \
mmd -i esp.img EFI/BOOT
RUN ls -la /boot/efi/EFI && \
ls -la /boot/efi/EFI/BOOT && \
ls -la /boot/efi/EFI/redhat
RUN mcopy -i esp.img -v /boot/efi/EFI/BOOT/BOOTX64.EFI ::EFI/BOOT && \
mcopy -i esp.img -v /boot/efi/EFI/redhat/grubx64.efi ::EFI/BOOT && \
mdir -i esp.img ::EFI/BOOT

RUN ls -la /boot/efi/EFI

FROM ubi8

RUN yum update -y && \
Expand All @@ -7,9 +24,10 @@ RUN yum update -y && \
yum clean all && \
rm -rf /var/cache/{yum,dnf}/*

copy ./prepare-ipxe.sh /tmp
COPY ./prepare-ipxe.sh /tmp
RUN chmod +x /tmp/prepare-ipxe.sh && /tmp/prepare-ipxe.sh && rm /tmp/prepare-ipxe.sh

COPY --from=builder /tmp/esp.img /httpboot/uefi_esp.img

COPY ./ironic.conf /tmp/ironic.conf
RUN crudini --merge /etc/ironic/ironic.conf < /tmp/ironic.conf && \
Expand Down

0 comments on commit f0d6392

Please sign in to comment.