0064db95fe
The original image-builder approach had an entirely containerized approach for building target images. This approach was flawed because: 1. There are a number of debian packages which will not install without /sys, /proc, /dev, or /dev/pts mountpoints, and 2. Container build process does not support building with privileges needed to bind-mount these directories into the chroot build space 3. It is a requirement for all packages to be installed in the container image in order to avoid deployment risk of missing mirror resources This patchset addresses this problem by performing necessary privileged steps outside of a containerized build process. At the end of this process, the root filesystem is packaged into a docker container when elevated permissions are no longer required. Change-Id: I5f8dc972f67c5649bf5f9403a5a512d06c948720
67 lines
2.3 KiB
Docker
67 lines
2.3 KiB
Docker
FROM ubuntu:focal as base-image
|
|
|
|
LABEL org.opencontainers.image.authors='airship-discuss@lists.airshipit.org, irc://#airshipit@freenode' \
|
|
org.opencontainers.image.url='https://airshipit.org' \
|
|
org.opencontainers.image.documentation='https://airship-images.readthedocs.org' \
|
|
org.opencontainers.image.source='https://opendev.org/airship/images' \
|
|
org.opencontainers.image.vendor='The Airship Authors' \
|
|
org.opencontainers.image.licenses='Apache-2.0'
|
|
|
|
SHELL ["bash", "-exc"]
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
|
|
RUN apt-get update ;\
|
|
apt-get install -y --no-install-recommends \
|
|
ca-certificates \
|
|
multistrap \
|
|
equivs \
|
|
build-essential \
|
|
gnupg2 \
|
|
xorriso \
|
|
python3-minimal \
|
|
python3-yaml \
|
|
python3-pip \
|
|
python3-setuptools \
|
|
python3-apt \
|
|
grub-pc-bin \
|
|
coreutils \
|
|
curl \
|
|
qemu-utils \
|
|
parted \
|
|
squashfs-tools \
|
|
extlinux \
|
|
syslinux-common \
|
|
xfsprogs \
|
|
vim \
|
|
kmod \
|
|
efivar \
|
|
rsync \
|
|
dosfstools ;\
|
|
pip3 install --upgrade pip ;\
|
|
pip3 install --upgrade wheel ;\
|
|
pip3 install --upgrade ansible ;\
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN curl -L https://github.com/mikefarah/yq/releases/download/2.4.0/yq_linux_amd64 -o /bin/yq \
|
|
&& chmod +x /bin/yq
|
|
|
|
COPY assets/playbooks/inventory.yaml /opt/assets/playbooks/inventory.yaml
|
|
COPY assets/playbooks/base-chroot.yaml /opt/assets/playbooks/base-chroot.yaml
|
|
COPY assets/playbooks/roles/multistrap /opt/assets/playbooks/roles/multistrap
|
|
COPY assets/playbooks/base-osconfig.yaml /opt/assets/playbooks/base-osconfig.yaml
|
|
COPY assets/playbooks/roles/osconfig /opt/assets/playbooks/roles/osconfig
|
|
COPY assets/playbooks/base-livecdcontent.yaml /opt/assets/playbooks/base-livecdcontent.yaml
|
|
COPY assets/playbooks/roles/livecdcontent /opt/assets/playbooks/roles/livecdcontent
|
|
COPY assets/playbooks/iso.yaml /opt/assets/playbooks/iso.yaml
|
|
COPY assets/playbooks/roles/iso /opt/assets/playbooks/roles/iso
|
|
COPY assets/playbooks/qcow.yaml /opt/assets/playbooks/qcow.yaml
|
|
COPY assets/playbooks/roles/qcow /opt/assets/playbooks/roles/qcow
|
|
|
|
COPY assets/playbooks/build /build
|
|
|
|
COPY assets/*.sh /usr/bin/local/
|
|
COPY assets/*.json /usr/bin/local/
|
|
CMD /usr/bin/local/entrypoint.sh
|
|
|