|
| 1 | +# SPDX-License-Identifier: Apache-2.0 |
| 2 | + |
| 3 | +# Copyright (c) 2024 SUSE LLC |
| 4 | + |
| 5 | +# All modifications and additions to the file contributed by third parties |
| 6 | +# remain the property of their copyright owners, unless otherwise agreed |
| 7 | +# upon. |
| 8 | + |
| 9 | +# The content of THIS FILE IS AUTOGENERATED and should not be manually modified. |
| 10 | +# It is maintained by the BCI team and generated by |
| 11 | +# https://github.com/SUSE/BCI-dockerfile-generator |
| 12 | + |
| 13 | +# Please submit bugfixes or comments via https://bugs.opensuse.org/ |
| 14 | +# You can contact the BCI team via https://github.com/SUSE/bci/discussions |
| 15 | + |
| 16 | + |
| 17 | +#!BuildTag: suse/podman:%%podman_version%% |
| 18 | +#!BuildTag: suse/podman:%%podman_version%%-%RELEASE% |
| 19 | +#!BuildTag: suse/podman:latest |
| 20 | +#!BuildName: suse-podman-%%podman_version%% |
| 21 | +#!BuildVersion: 15.6 |
| 22 | +#!BuildRelease: 35 |
| 23 | +FROM suse/sle15:15.6 |
| 24 | + |
| 25 | +RUN set -euo pipefail; zypper -n in --no-recommends podman fuse-overlayfs; zypper -n clean; rm -rf /var/log/{lastlog,tallylog,zypper.log,zypp/history,YaST2} |
| 26 | + |
| 27 | +# Define labels according to https://en.opensuse.org/Building_derived_containers |
| 28 | +# labelprefix=com.suse.application.podman |
| 29 | +LABEL org.opencontainers.image.authors="SUSE LLC (https://www.suse.com/)" |
| 30 | +LABEL org.opencontainers.image.title="SLE Podman" |
| 31 | +LABEL org.opencontainers.image.description="Podman container based on the SLE Base Container Image." |
| 32 | +LABEL org.opencontainers.image.version="%%podman_version%%" |
| 33 | +LABEL org.opencontainers.image.url="https://www.suse.com/products/base-container-images/" |
| 34 | +LABEL org.opencontainers.image.created="%BUILDTIME%" |
| 35 | +LABEL org.opencontainers.image.vendor="SUSE LLC" |
| 36 | +LABEL org.opencontainers.image.source="%SOURCEURL%" |
| 37 | +LABEL org.opencontainers.image.ref.name="%%podman_version%%-%RELEASE%" |
| 38 | +LABEL org.opensuse.reference="registry.suse.com/suse/podman:%%podman_version%%-%RELEASE%" |
| 39 | +LABEL org.openbuildservice.disturl="%DISTURL%" |
| 40 | +LABEL com.suse.supportlevel="techpreview" |
| 41 | +LABEL com.suse.eula="sle-eula" |
| 42 | +LABEL com.suse.lifecycle-url="https://www.suse.com/lifecycle#suse-linux-enterprise-server-15" |
| 43 | +LABEL com.suse.release-stage="released" |
| 44 | +# endlabelprefix |
| 45 | +LABEL io.artifacthub.package.readme-url="%SOURCEURL%/README.md" |
| 46 | +RUN useradd podman && \ |
| 47 | + echo -e "podman:1:999\npodman:1001:64535" > /etc/subuid && \ |
| 48 | + echo -e "podman:1:999\npodman:1001:64535" > /etc/subgid |
| 49 | + |
| 50 | +COPY containers.conf /etc/containers/containers.conf |
| 51 | +COPY podman-containers.conf /home/podman/.config/containers/containers.conf |
| 52 | + |
| 53 | +RUN mkdir -p /home/podman/.local/share/containers && \ |
| 54 | + chown podman:podman -R /home/podman && \ |
| 55 | + chmod 0644 /etc/containers/containers.conf |
| 56 | + |
| 57 | +# Copy & modify the defaults to provide reference if runtime changes needed. |
| 58 | +# Changes here are required for running with fuse-overlay storage inside container. |
| 59 | +RUN sed -e 's|^#mount_program|mount_program|g' \ |
| 60 | + -e '/additionalimage.*/a "/var/lib/shared",' \ |
| 61 | + -e 's|^mountopt[[:space:]]*=.*$|mountopt = "nodev,fsync=0"|g' \ |
| 62 | + /usr/share/containers/storage.conf \ |
| 63 | + > /etc/containers/storage.conf |
| 64 | + |
| 65 | +VOLUME /var/lib/containers |
| 66 | +VOLUME /home/podman/.local/share/containers |
| 67 | + |
| 68 | +RUN mkdir -p /var/lib/shared/overlay-images \ |
| 69 | + /var/lib/shared/overlay-layers \ |
| 70 | + /var/lib/shared/vfs-images \ |
| 71 | + /var/lib/shared/vfs-layers && \ |
| 72 | + touch /var/lib/shared/overlay-images/images.lock && \ |
| 73 | + touch /var/lib/shared/overlay-layers/layers.lock && \ |
| 74 | + touch /var/lib/shared/vfs-images/images.lock && \ |
| 75 | + touch /var/lib/shared/vfs-layers/layers.lock |
| 76 | + |
| 77 | +ENV _CONTAINERS_USERNS_CONFIGURED="" \ |
| 78 | + BUILDAH_ISOLATION=chroot |
0 commit comments