FROM docker.io/alpine:latest COPY ./containers.conf /containers.conf COPY ./containers-user.conf /containers-user.conf RUN sed -i 's|dl-cdn\.alpinelinux\.org/alpine|alpine.sakamoto.pl/alpine|g' /etc/apk/repositories &&\ apk add --no-cache podman git bash curl tree fuse-overlayfs openssh-client-default ucpp &&\ ln -s /usr/bin/ucpp /usr/local/bin/ucpp &&\ adduser -D podman -u 1000 &&\ echo 'podman:1:999' > /etc/subuid &&\ echo 'podman:1001:64535' >> /etc/subuid &&\ cp /etc/subuid /etc/subguid &&\ ln -s /usr/local/bin/podman /usr/bin/docker &&\ mkdir -p /home/podman/.config/containers &&\ mkdir -p /home/podman/.local/share/containers &&\ mv /containers.conf /etc/containers/containers.conf &&\ mv /containers-user.conf /home/podman/.config/containers/containers.conf &&\ chown podman:podman -R /home/podman &&\ chmod 644 /etc/containers/containers.conf &&\ sed -e 's|^#mount_program|mount_program|g' \ -e '/additionalimage.*/a "/var/lib/shared",' \ -e 's|^mountopt[[:space:]]*=.*$|mountopt = "nodev,fsync=0"|g' \ /usr/share/containers/storage.conf > /etc/containers/storage.conf &&\ printf '/run/secrets/etc-pki-entitlement:/run/secrets/etc-pki-entitlement\n/run/secrets/rhsm:/run/secrets/rhsm\n' > /etc/containers/mounts.conf &&\ mkdir -p /var/lib/shared/overlay-images \ /var/lib/shared/overlay-layers \ /var/lib/shared/vfs-images \ /var/lib/shared/vfs-layers &&\ touch /var/lib/shared/overlay-images/images.lock \ /var/lib/shared/overlay-layers/layers.lock \ /var/lib/shared/vfs-images/images.lock \ /var/lib/shared/vfs-layers/layers.lock \ ENV _CONTAINERS_USERNS_CONFIGURED="" BUILDAH_ISOLATION="chroot" VOLUME /var/lib/containers/storage VOLUME /home/podman/.local/share/containers ENTRYPOINT [ "/bin/bash" ]