aboutsummaryrefslogtreecommitdiff
path: root/contrib/podmanimage/stable/Dockerfile
diff options
context:
space:
mode:
authorTomSweeneyRedHat <tsweeney@redhat.com>2020-01-08 14:19:26 -0500
committerTomSweeneyRedHat <tsweeney@redhat.com>2020-01-08 14:21:21 -0500
commit77994c495753d31795e0888cefa959188f13c31c (patch)
tree4e45790ef07c1efa14dbb14deab79963c4a65712 /contrib/podmanimage/stable/Dockerfile
parentc99b413abbc74f6f7e126d8bca58f44a3fcd9c2d (diff)
downloadpodman-77994c495753d31795e0888cefa959188f13c31c.tar.gz
podman-77994c495753d31795e0888cefa959188f13c31c.tar.bz2
podman-77994c495753d31795e0888cefa959188f13c31c.zip
Update podmanimage build process
(Stealing from: @rhatdan 's https://github.com/containers/buildah/pull/2038 ) 1 We need to update all packages in the podman image to make sure they are up2date. 2 reinstall shadow-utils. For some reason the fedora base image does not include the file capabilities assigned to /usr/bin/newuidmap and /usr/bin/newgidmap. Reinstalling shadow-utils, brings them back. 3 Add a default user build to the system. This will create the /etc/subuid and /etc/subgid maps get created correctly. Once we have this we should be able to build a container starting with a non privileged user podman run -ti --user build --device=/dev/fuse -v ./Dockerfile:/Dockerfile:z quay.io/podman/stable podman buildd / Addresses: #4741 Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
Diffstat (limited to 'contrib/podmanimage/stable/Dockerfile')
-rw-r--r--contrib/podmanimage/stable/Dockerfile4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/podmanimage/stable/Dockerfile b/contrib/podmanimage/stable/Dockerfile
index 6b4eb2220..c0c07d9d2 100644
--- a/contrib/podmanimage/stable/Dockerfile
+++ b/contrib/podmanimage/stable/Dockerfile
@@ -9,9 +9,9 @@
FROM fedora:latest
# Don't include container-selinux and remove
-# directories used by dnf that are just taking
+# directories used by yum that are just taking
# up space.
-RUN yum -y install podman fuse-overlayfs --exclude container-selinux; rm -rf /var/cache /var/log/dnf* /var/log/yum.*
+RUN useradd build; yum -y update; yum -y reinstall shadow-utils; yum -y install podman fuse-overlayfs --exclude container-selinux; rm -rf /var/cache /var/log/dnf* /var/log/yum.*
# Adjust storage.conf to enable Fuse storage.
RUN sed -i -e 's|^#mount_program|mount_program|g' -e '/additionalimage.*/a "/var/lib/shared",' /etc/containers/storage.conf