Apply misc changes to Dockerfile to align with upstream
Having a completely different image and build system the Dockerfile will always differ quite significantly from the upstream one. Nonetheless, it's still useful to make the commont parts to look alike as much as possible to ease maintanance and update. Note, this is just a small set of changes that are possible, more effort into this direction may follow at later stage.
This commit is contained in:
@@ -32,7 +32,9 @@ RUN mkdir -p /installroot/var/lib/ironic && \
|
||||
/installroot/usr/bin/sqlite3 /installroot/var/lib/ironic/ironic.sqlite "pragma journal_mode=wal" && \
|
||||
zypper --installroot /installroot --non-interactive remove sqlite3
|
||||
|
||||
# build actual image
|
||||
FROM micro AS final
|
||||
|
||||
MAINTAINER SUSE LLC (https://www.suse.com/)
|
||||
# Define labels according to https://en.opensuse.org/Building_derived_containers
|
||||
LABEL org.opencontainers.image.title="SLE Openstack Ironic Container Image"
|
||||
@@ -62,11 +64,12 @@ RUN echo 'alias mkisofs="xorriso -as mkisofs"' >> ~/.bashrc
|
||||
COPY mkisofs_wrapper /usr/bin/mkisofs
|
||||
RUN set -euo pipefail; chmod +x /usr/bin/mkisofs
|
||||
|
||||
RUN mkdir -p /tftpboot
|
||||
RUN mkdir -p $GRUB_DIR
|
||||
|
||||
COPY scripts/ /bin/
|
||||
COPY configure-nonroot.sh /bin/
|
||||
RUN set -euo pipefail; chmod +x /bin/configure-ironic.sh /bin/rundnsmasq /bin/runhttpd /bin/runironic /bin/runlogwatch.sh /bin/configure-nonroot.sh
|
||||
RUN mkdir -p /tftpboot
|
||||
RUN mkdir -p $GRUB_DIR
|
||||
|
||||
# No need to support the Legacy BIOS boot
|
||||
#RUN cp /usr/share/syslinux/pxelinux.0 /tftpboot
|
||||
@@ -93,16 +96,15 @@ COPY ironic-config/network-data-schema-empty.json /etc/ironic/
|
||||
# DNSMASQ
|
||||
COPY ironic-config/dnsmasq.conf.j2 /etc/
|
||||
|
||||
# Workaround
|
||||
# Removing the 010-ironic.conf file that comes with the package
|
||||
RUN rm /etc/ironic/ironic.conf.d/010-ironic.conf
|
||||
|
||||
# Custom httpd config, removes all but the bare minimum needed modules
|
||||
COPY ironic-config/httpd.conf.j2 /etc/httpd/conf/
|
||||
COPY ironic-config/httpd-modules.conf /etc/httpd/conf.modules.d/
|
||||
COPY ironic-config/apache2-vmedia.conf.j2 /etc/httpd-vmedia.conf.j2
|
||||
COPY ironic-config/apache2-ipxe.conf.j2 /etc/httpd-ipxe.conf.j2
|
||||
|
||||
# Workaround
|
||||
# Removing the 010-ironic.conf file that comes with the package
|
||||
RUN rm /etc/ironic/ironic.conf.d/010-ironic.conf
|
||||
|
||||
# configure non-root user and set relevant permissions
|
||||
RUN configure-nonroot.sh && \
|
||||
rm -f /bin/configure-nonroot.sh
|
||||
RUN configure-nonroot.sh && rm -f /bin/configure-nonroot.sh
|
||||
|
Reference in New Issue
Block a user