Skip to content

Commit

Permalink
fix(devel): configure xdg env
Browse files Browse the repository at this point in the history
  • Loading branch information
HoKim98 committed Sep 27, 2024
1 parent 2096478 commit 8c9eb3a
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions templates/devel/scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ USER_HOME="/home/user"
USER_NAME="${USER_HOME##*/}"
USER_ID="$(id -u "${USER_NAME}")"

###########################################################
# XDG Configuration #
###########################################################

export XDG_RUNTIME_DIR="/run/user/${USER_ID}"

mkdir -p "${XDG_RUNTIME_DIR}"
chown "${USER_NAME}:${USER_NAME}" "${XDG_RUNTIME_DIR}"

###########################################################
# SSH Configuration #
###########################################################
Expand Down Expand Up @@ -99,10 +108,6 @@ fi
# Run Docker Daemon #
###########################################################

export XDG_RUNTIME_DIR="/run/user/${USER_ID}"
mkdir -p "${XDG_RUNTIME_DIR}"
chown "${USER_NAME}:${USER_NAME}" "${XDG_RUNTIME_DIR}"

export DOCKER_BIN="${USER_HOME}/.local/bin"
export DOCKER_HOST="unix://${XDG_RUNTIME_DIR}/docker.sock"
export PATH="${DOCKER_BIN}:${PATH}"
Expand Down

0 comments on commit 8c9eb3a

Please sign in to comment.