Skip to content
This repository was archived by the owner on Nov 30, 2023. It is now read-only.

Commit 200ce9c

Browse files
authored
fix: change user before run go get/install (#1150)
change user before run go get/install to avoid permission on /go/pkg/cache
1 parent 46b3e5c commit 200ce9c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

containers/go/.devcontainer/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/
1010
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
1111
# && apt-get -y install --no-install-recommends <your-package-list-here>
1212

13-
# [Optional] Uncomment the next line to use go get to install anything else you need
13+
# [Optional] Uncomment the next lines to use go get to install anything else you need
14+
# USER vscode
1415
# RUN go get -x <your-dependency-or-tool>
1516

1617
# [Optional] Uncomment this line to install global node packages.
17-
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
18+
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1

0 commit comments

Comments
 (0)