Create user storage dir with correct permissions

Docker VOLUMEs will inherit permissions from an existing directory at the same
path. If the path does not exist, the directory will be owned by root which
makes this image unusable in rootless mode.

Signed-off-by: Blake Burkhart <blake.burkhart@us.af.mil>
This commit is contained in:
Blake Burkhart
2021-06-14 14:13:51 -05:00
parent e2f51eeb06
commit 2a974e8b94
3 changed files with 3 additions and 0 deletions

View File

@ -21,6 +21,7 @@ echo podman:10000:5000 > /etc/subgid;
VOLUME /var/lib/containers VOLUME /var/lib/containers
VOLUME /home/podman/.local/share/containers VOLUME /home/podman/.local/share/containers
RUN mkdir -p /home/podman/.local/share/containers
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/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 ADD https://raw.githubusercontent.com/containers/libpod/master/contrib/podmanimage/stable/podman-containers.conf /home/podman/.config/containers/containers.conf

View File

@ -21,6 +21,7 @@ echo podman:10000:5000 > /etc/subgid;
VOLUME /var/lib/containers VOLUME /var/lib/containers
VOLUME /home/podman/.local/share/containers VOLUME /home/podman/.local/share/containers
RUN mkdir -p /home/podman/.local/share/containers
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/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 ADD https://raw.githubusercontent.com/containers/libpod/master/contrib/podmanimage/stable/podman-containers.conf /home/podman/.config/containers/containers.conf

View File

@ -69,6 +69,7 @@ echo podman:10000:5000 > /etc/subgid;
VOLUME /var/lib/containers VOLUME /var/lib/containers
VOLUME /home/podman/.local/share/containers VOLUME /home/podman/.local/share/containers
RUN mkdir -p /home/podman/.local/share/containers
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/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 ADD https://raw.githubusercontent.com/containers/libpod/master/contrib/podmanimage/stable/podman-containers.conf /home/podman/.config/containers/containers.conf