Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix home directory ownership so that podman 5 does not error
Browse files Browse the repository at this point in the history
cgruver committed Dec 10, 2024
1 parent 170d300 commit fe5328c
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 0 additions & 5 deletions base/ubi9/Dockerfile
Original file line number Diff line number Diff line change
@@ -117,11 +117,6 @@ RUN mkdir -p /var/lib/shared/overlay-images /var/lib/shared/overlay-layers; \
touch /var/lib/shared/overlay-images/images.lock; \
touch /var/lib/shared/overlay-layers/layers.lock

# But use VFS since not all environments support overlay with Fuse backend
RUN mkdir -p "${HOME}"/.config/containers && \
(echo '[storage]';echo 'driver = "vfs"') > "${HOME}"/.config/containers/storage.conf && \
chown -R 10001 "${HOME}"/.config

# Add kubedock
ENV KUBEDOCK_VERSION 0.17.0
ENV KUBECONFIG=/home/user/.kube/config
7 changes: 7 additions & 0 deletions base/ubi9/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -5,6 +5,13 @@ if [ ! -d "${HOME}" ]; then
mkdir -p "${HOME}"
fi

# Configure container builds to use vfs
if [ ! -d "${HOME}/.config/containers" ]
then
mkdir -p ${HOME}/.config/containers
(echo '[storage]';echo 'driver = "vfs"') > "${HOME}"/.config/containers/storage.conf
fi

# Setup $PS1 for a consistent and reasonable prompt
if [ -w "${HOME}" ] && [ ! -f "${HOME}"/.bashrc ]; then
echo "PS1='[\u@\h \W]\$ '" > "${HOME}"/.bashrc

0 comments on commit fe5328c

Please sign in to comment.