summaryrefslogtreecommitdiff
path: root/contrib/podmanimage/stable/Dockerfile
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-11-11 02:33:35 +0100
committerGitHub <noreply@github.com>2021-11-11 02:33:35 +0100
commit5f3ce2515d9bbae726e14ef4bc7dede442a6c582 (patch)
treefe89798063c31f1c51c390802e6accf6cc941778 /contrib/podmanimage/stable/Dockerfile
parentfa8184c80723a4782105a1d85542bb885888bc09 (diff)
parent980c47aaa296afb027405ec5f30dbefceafb418b (diff)
downloadpodman-5f3ce2515d9bbae726e14ef4bc7dede442a6c582.tar.gz
podman-5f3ce2515d9bbae726e14ef4bc7dede442a6c582.tar.bz2
podman-5f3ce2515d9bbae726e14ef4bc7dede442a6c582.zip
Merge pull request #12261 from rhatdan/Dockerfile
[CI:DOCS] VOLUME must be declared after RUN chown command
Diffstat (limited to 'contrib/podmanimage/stable/Dockerfile')
-rw-r--r--contrib/podmanimage/stable/Dockerfile9
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/podmanimage/stable/Dockerfile b/contrib/podmanimage/stable/Dockerfile
index f980d15ed..7950269d2 100644
--- a/contrib/podmanimage/stable/Dockerfile
+++ b/contrib/podmanimage/stable/Dockerfile
@@ -19,14 +19,15 @@ RUN useradd podman; \
echo podman:10000:5000 > /etc/subuid; \
echo podman:10000:5000 > /etc/subgid;
-VOLUME /var/lib/containers
-VOLUME /home/podman/.local/share/containers
-RUN mkdir -p /home/podman/.local/share/containers
+RUN mkdir -p /home/podman/.local/share/containers; chown podman:podman -R /home/podman
ADD https://raw.githubusercontent.com/containers/libpod/master/contrib/podmanimage/stable/containers.conf /etc/containers/containers.conf
ADD https://raw.githubusercontent.com/containers/libpod/master/contrib/podmanimage/stable/podman-containers.conf /home/podman/.config/containers/containers.conf
-RUN chown podman:podman -R /home/podman
+# Note VOLUME options must always happen after the chown call above
+# RUN commands can not modify existing volumes
+VOLUME /var/lib/containers
+VOLUME /home/podman/.local/share/containers
# chmod containers.conf and adjust storage.conf to enable Fuse storage.
RUN chmod 644 /etc/containers/containers.conf; sed -i -e 's|^#mount_program|mount_program|g' -e '/additionalimage.*/a "/var/lib/shared",' -e 's|^mountopt[[:space:]]*=.*$|mountopt = "nodev,fsync=0"|g' /etc/containers/storage.conf