Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ ARG USER_ID="1000"
# drawback still pays off as running this image as root is a corner case.
ENV USER="${USER}"
ENV HOME="/home/${USER}"
ENV PATH="${HOME}/.local/bin:${HOME}/.volta/bin:${PATH}"
ENV VOLTA_HOME="/opt/volta"
ENV PKGX_DIR="/opt/pkgx"
ENV PATH="${VOLTA_HOME}/bin:${HOME}/.local/bin:${PATH}"

RUN --mount=type=bind,source=devcontainer/scripts/prepare_user.sh,target=/prepare_user.sh \
/prepare_user.sh
Expand Down
2 changes: 1 addition & 1 deletion devcontainer/scripts/prepare_user.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ VOLTA_VERSION="1.1.1"
sudo -u "${USER}" pkgx install "volta.sh@${VOLTA_VERSION}"

# cleanup
sudo -u "${USER}" rm -rf "${HOME}/.pkgx" "${HOME}/.cache/pkgx" "${HOME}/.local/share/pkgx"
sudo -u "${USER}" rm -rf "${PKGX_DIR}" "${HOME}/.cache/pkgx" "${HOME}/.local/share/pkgx"

shopt -s nullglob dotglob
rm -rf /tmp/* /var/cache/* /var/lib/apt/lists/*