Skip to content

Commit

Permalink
update dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Silvija Tovernic committed Sep 20, 2024
1 parent a39e493 commit 32c1526
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions images/docker/image-factory-runner/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ RUN apt-get update -y && \
buildah \
ca-certificates \
curl \
fuse-overlayfs \
git \
gnupg \
jq \
Expand All @@ -32,14 +33,16 @@ RUN apt-get update -y && \


# Create runner user
RUN mkdir -p ${USER_HOME}/containers && \
useradd -r -d ${USER_HOME} -s /sbin/nologin -c "GitHub Actions User" ${USER_NAME} && \
chown ${USER_GROUP}:${USER_NAME} ${USER_HOME}

# Add podman configuration file(s)
ADD files/containers.conf ${USER_HOME}/containers/containers.conf
ADD files/registries.conf ${USER_HOME}/containers/registries.conf
RUN chown ${USER_GROUP}:${USER_NAME} ${USER_HOME}
RUN mkdir -p ${USER_HOME} && \
useradd -r -d ${USER_HOME} -s /sbin/nologin -c "GitHub Actions User" ${USER_NAME}

# Add podman configuration file(s) and permissions
ADD files/containers.conf ${USER_HOME}/.config/containers/containers.conf
ADD files/registries.conf ${USER_HOME}/.config/containers/registries.conf
RUN mkdir -p ${USER_HOME}/.local/share/containers \
chown -R ${USER_GROUP}:${USER_NAME} ${USER_HOME}

VOLUME ${USER_HOME}/.local/share/containers

# Setup for rootless podman
RUN usermod --add-subuids 100000-165535 --add-subgids 100000-165535 ${USER_NAME}
Expand Down

0 comments on commit 32c1526

Please sign in to comment.