-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy path9-stackhpc
More file actions
30 lines (24 loc) · 1.29 KB
/
9-stackhpc
File metadata and controls
30 lines (24 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Based on https://github.com/openstack/diskimage-builder/blob/master/diskimage_builder/elements/rocky-container/containerfiles/9
FROM docker.io/rockylinux/rockylinux:9
ARG ROCKY_USE_MIRROR=false
ARG ROCKY_APPSTREAM_URL
ARG ROCKY_BASEOS_URL
RUN if [ ${ROCKY_USE_MIRROR} = "true" ]; then \
dnf -y install 'dnf-command(config-manager)' && \
dnf clean all && \
mkdir /tmp/orig_repos && mv -f /etc/yum.repos.d/* /tmp/orig_repos/ && \
dnf config-manager --add-repo ${ROCKY_APPSTREAM_URL} && \
dnf config-manager --add-repo ${ROCKY_BASEOS_URL} && \
dnf -y distro-sync && \
rm -f /etc/yum.repos.d/rocky*.repo; fi
RUN dnf group install -y 'Minimal Install' --allowerasing && \
dnf install -y findutils util-linux \
https://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages/cloud-init-23.1.1-12.el9.noarch.rpm
RUN sed -i "s/renderers:.*/renderers: ['network-manager']\n activators: ['network-manager']/" /etc/cloud/cloud.cfg
RUN systemctl unmask console-getty.service dev-hugepages.mount \
getty.target sys-fs-fuse-connections.mount systemd-logind.service \
systemd-remount-fs.service
# /etc/machine-id needs to be populated for /bin/kernel-install to
# correctly copy kernels into /boot. We will clear this out in the
# final image.
RUN systemd-machine-id-setup