Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: define user directory for binaries #117

Merged
merged 3 commits into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion universal/ubi8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ ENV KUBECONFIG=/home/user/.kube/config

USER 0

# Define user direcotry for binaries
vitaliy-guliy marked this conversation as resolved.
Show resolved Hide resolved
RUN mkdir -p /home/user/.local/bin && \
chgrp -R 0 /home && chmod -R g=u /home
ENV PATH="/home/user/.local/bin:$PATH"

# Required packages for AWT
RUN dnf install -y libXext libXrender libXtst libXi

Expand Down Expand Up @@ -445,7 +450,7 @@ rm -rf "${TEMP_DIR}"
EOF

# Set permissions on /etc/passwd and /home to allow arbitrary users to write
RUN mkdir -p /home/user && chgrp -R 0 /home && chmod -R g=u /etc/passwd /etc/group /home
RUN chgrp -R 0 /home && chmod -R g=u /etc/passwd /etc/group /home

# cleanup dnf cache
RUN dnf -y clean all --enablerepo='*'
Expand Down
2 changes: 0 additions & 2 deletions universal/ubi8/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ if [ "${KUBEDOCK_ENABLED:-false}" = "true" ]; then

echo "Replacing podman with podman-wrapper..."

mkdir -p /home/user/.local/bin/
ln -f -s /usr/bin/podman.wrapper /home/user/.local/bin/podman

export TESTCONTAINERS_RYUK_DISABLED="true"
Expand All @@ -39,7 +38,6 @@ else
echo "Kubedock is disabled. It can be enabled with the env variable \"KUBEDOCK_ENABLED=true\""
echo "set in the workspace Devfile or in a Kubernetes ConfigMap in the developer namespace."
echo
mkdir -p /home/user/.local/bin/
ln -f -s /usr/bin/podman.orig /home/user/.local/bin/podman
fi

Expand Down
Loading