|
| 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: opensuse/podman:%%podman_version%% |
| 18 | +#!BuildTag: opensuse/podman:%%podman_version%%-%RELEASE% |
| 19 | +#!BuildTag: opensuse/podman:latest |
| 20 | + |
| 21 | +FROM opensuse/tumbleweed:latest |
| 22 | + |
| 23 | +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} |
| 24 | + |
| 25 | +# Define labels according to https://en.opensuse.org/Building_derived_containers |
| 26 | +# labelprefix=org.opensuse.application.podman |
| 27 | +LABEL org.opencontainers.image.authors="openSUSE (https://www.opensuse.org/)" |
| 28 | +LABEL org.opencontainers.image.title="openSUSE Tumbleweed Podman" |
| 29 | +LABEL org.opencontainers.image.description="Podman container based on the openSUSE Tumbleweed Base Container Image." |
| 30 | +LABEL org.opencontainers.image.version="%%podman_version%%" |
| 31 | +LABEL org.opencontainers.image.url="https://www.opensuse.org" |
| 32 | +LABEL org.opencontainers.image.created="%BUILDTIME%" |
| 33 | +LABEL org.opencontainers.image.vendor="openSUSE Project" |
| 34 | +LABEL org.opencontainers.image.source="%SOURCEURL%" |
| 35 | +LABEL org.opencontainers.image.ref.name="%%podman_version%%-%RELEASE%" |
| 36 | +LABEL org.opensuse.reference="registry.opensuse.org/opensuse/podman:%%podman_version%%-%RELEASE%" |
| 37 | +LABEL org.openbuildservice.disturl="%DISTURL%" |
| 38 | +LABEL org.opensuse.lifecycle-url="https://en.opensuse.org/Lifetime#openSUSE_BCI" |
| 39 | +LABEL org.opensuse.release-stage="released" |
| 40 | +# endlabelprefix |
| 41 | +LABEL io.artifacthub.package.readme-url="https://raw.githubusercontent.com/SUSE/BCI-dockerfile-generator/Tumbleweed/podman-image/README.md" |
| 42 | +LABEL io.artifacthub.package.logo-url="https://raw.githubusercontent.com/containers/common/main/logos/podman-logo-full-vert.png" |
| 43 | +RUN useradd -U podman && \ |
| 44 | + echo -e "podman:1:999\npodman:1001:64535" > /etc/subuid && \ |
| 45 | + echo -e "podman:1:999\npodman:1001:64535" > /etc/subgid |
| 46 | + |
| 47 | +COPY containers.conf /etc/containers/containers.conf |
| 48 | +COPY podman-containers.conf /home/podman/.config/containers/containers.conf |
| 49 | + |
| 50 | +RUN mkdir -p /home/podman/.local/share/containers && \ |
| 51 | + chown podman:podman -R /home/podman && \ |
| 52 | + chmod 0644 /etc/containers/containers.conf |
| 53 | + |
| 54 | +RUN cp /usr/share/containers/storage.conf /etc/containers/storage.conf |
| 55 | +# Copy & modify the defaults to provide reference if runtime changes needed. |
| 56 | +# Changes here are required for running with fuse-overlay storage inside container. |
| 57 | +RUN sed -i -e 's|^#mount_program|mount_program|g' \ |
| 58 | + -e '/additionalimage.*/a "/var/lib/shared",' \ |
| 59 | + -e 's|^mountopt[[:space:]]*=.*$|mountopt = "nodev,fsync=0"|g' \ |
| 60 | + /etc/containers/storage.conf |
| 61 | + |
| 62 | +VOLUME /var/lib/containers |
| 63 | +VOLUME /home/podman/.local/share/containers |
| 64 | + |
| 65 | +RUN mkdir -p /var/lib/shared/overlay-images \ |
| 66 | + /var/lib/shared/overlay-layers \ |
| 67 | + /var/lib/shared/vfs-images \ |
| 68 | + /var/lib/shared/vfs-layers && \ |
| 69 | + touch /var/lib/shared/overlay-images/images.lock && \ |
| 70 | + touch /var/lib/shared/overlay-layers/layers.lock && \ |
| 71 | + touch /var/lib/shared/vfs-images/images.lock && \ |
| 72 | + touch /var/lib/shared/vfs-layers/layers.lock |
| 73 | + |
| 74 | +# fix capabilities of newuidmap & newgidmap |
| 75 | +RUN permctl --system |
| 76 | + |
| 77 | +ENV _CONTAINERS_USERNS_CONFIGURED="" \ |
| 78 | + BUILDAH_ISOLATION=chroot |
0 commit comments