From afb8dfe9e579be811209a4f697e06c05d8a95744 Mon Sep 17 00:00:00 2001 From: Andrew Obuchowicz Date: Mon, 13 Nov 2023 17:50:10 -0500 Subject: [PATCH] chore: define user directory for binaries Signed-off-by: Andrew Obuchowicz --- devspaces-udi/Dockerfile | 6 ++++-- devspaces-udi/etc/entrypoint.sh | 2 -- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/devspaces-udi/Dockerfile b/devspaces-udi/Dockerfile index 5bb1a1443e..478ee3fffd 100644 --- a/devspaces-udi/Dockerfile +++ b/devspaces-udi/Dockerfile @@ -86,7 +86,7 @@ ENV \ JAVA_HOME_8=/usr/lib/jvm/java-1.8.0-openjdk \ JAVA_HOME="/home/tooling/.java/current" \ GOBIN="/home/tooling/go/bin/" \ - PATH="/home/tooling/.local/bin:/home/tooling/.java/current/bin:/home/tooling/node_modules/.bin/:/home/tooling/.npm-global/bin/:/opt/app-root/src/.npm-global/bin/:/usr/share/maven/bin:/usr/bin:/home/tooling/go/bin:${PATH:-/bin:/usr/bin}" \ + PATH="/home/user/.local/bin:/home/tooling/.local/bin:/home/tooling/.java/current/bin:/home/tooling/node_modules/.bin/:/home/tooling/.npm-global/bin/:/opt/app-root/src/.npm-global/bin/:/usr/share/maven/bin:/usr/bin:/home/tooling/go/bin:${PATH:-/bin:/usr/bin}" \ MANPATH="/usr/share/man:${MANPATH}" \ JAVACONFDIRS="/etc/java${JAVACONFDIRS:+:}${JAVACONFDIRS:-}" \ XDG_CONFIG_DIRS="/etc/xdg:${XDG_CONFIG_DIRS:-/etc/xdg}" \ @@ -194,7 +194,9 @@ RUN \ > ${HOME}/passwd.template && \ cat /etc/group | \ sed s#root:x:0:#root:x:0:0,\${USER_ID}:#g \ - > ${HOME}/group.template + > ${HOME}/group.template && \ + # Define user directory for binaries + mkdir -p /home/tooling/.local/bin RUN \ ## Rootless podman install #2: install podman buildah skopeo e2fsprogs (above) diff --git a/devspaces-udi/etc/entrypoint.sh b/devspaces-udi/etc/entrypoint.sh index 0678f65c5f..c14ca9b178 100755 --- a/devspaces-udi/etc/entrypoint.sh +++ b/devspaces-udi/etc/entrypoint.sh @@ -98,7 +98,6 @@ if [[ "${KUBEDOCK_ENABLED:-false}" == "true" ]]; then echo "Replacing podman with podman-wrapper.sh..." - mkdir -p /home/tooling/.local/bin/ ln -f -s /usr/bin/podman-wrapper.sh /home/tooling/.local/bin/podman export TESTCONTAINERS_RYUK_DISABLED="true" @@ -115,7 +114,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/tooling/.local/bin/ ln -f -s /usr/bin/podman.orig /home/tooling/.local/bin/podman fi