This repository was archived by the owner on Nov 30, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +12
-18
lines changed
javascript-node-mongo/.devcontainer
javascript-node-postgres/.devcontainer
python-3-postgres/.devcontainer Expand file tree Collapse file tree 3 files changed +12
-18
lines changed Original file line number Diff line number Diff line change 22ARG VARIANT=12
33FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:${VARIANT}
44
5- # This Dockerfile adds a non-root user with sudo access. Update the “remoteUser” property in
6- # devcontainer.json to use it. More info: https://aka.ms/vscode-remote/containers/non-root-user.
7- ARG USERNAME=node
5+ # Update args in docker-compose.yaml to set the UID/GID of the "node" user.
86ARG USER_UID=1000
97ARG USER_GID=$USER_UID
108RUN if [ "$USER_GID" != "1000" ] || [ "$USER_UID" != "1000" ]; then \
11- groupmod --gid $USER_GID $USERNAME \
12- && usermod --uid $USER_UID --gid $USER_GID $USERNAME \
13- && chmod -R $USER_UID:$USER_GID /home/$USERNAME \
9+ groupmod --gid $USER_GID node \
10+ && usermod --uid $USER_UID --gid $USER_GID node \
11+ && chmod -R $USER_UID:$USER_GID /home/node \
1412 && chmod -R $USER_UID:root /usr/local/share/nvm /usr/local/share/npm-global; \
1513 fi
1614
Original file line number Diff line number Diff line change 22ARG VARIANT=12
33FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:${VARIANT}
44
5- # This Dockerfile adds a non-root user with sudo access. Update the “remoteUser” property in
6- # devcontainer.json to use it. More info: https://aka.ms/vscode-remote/containers/non-root-user.
7- ARG USERNAME=node
5+ # Update args in docker-compose.yaml to set the UID/GID of the "node" user.
86ARG USER_UID=1000
97ARG USER_GID=$USER_UID
108RUN if [ "$USER_GID" != "1000" ] || [ "$USER_UID" != "1000" ]; then \
11- groupmod --gid $USER_GID $USERNAME \
12- && usermod --uid $USER_UID --gid $USER_GID $USERNAME \
13- && chmod -R $USER_UID:$USER_GID /home/$USERNAME \
9+ groupmod --gid $USER_GID node \
10+ && usermod --uid $USER_UID --gid $USER_GID node \
11+ && chmod -R $USER_UID:$USER_GID /home/node \
1412 && chmod -R $USER_UID:root /usr/local/share/nvm /usr/local/share/npm-global; \
1513 fi
1614
Original file line number Diff line number Diff line change @@ -4,15 +4,13 @@ FROM mcr.microsoft.com/vscode/devcontainers/python:${VARIANT}
44
55ENV PYTHONUNBUFFERED 1
66
7- # This Dockerfile adds a non-root user with sudo access. Update the “remoteUser” property in
8- # devcontainer.json to use it. More info: https://aka.ms/vscode-remote/containers/non-root-user.
9- ARG USERNAME=vscode
7+ # Update args in docker-compose.yaml to set the UID/GID of the "vscode" user.
108ARG USER_UID=1000
119ARG USER_GID=$USER_UID
1210RUN if [ "$USER_GID" != "1000" ] || [ "$USER_UID" != "1000" ]; then \
13- groupmod --gid $USER_GID $USERNAME \
14- && usermod --uid $USER_UID --gid $USER_GID $USERNAME \
15- && chmod -R $USER_UID:$USER_GID /home/$USERNAME ; \
11+ groupmod --gid $USER_GID vscode \
12+ && usermod --uid $USER_UID --gid $USER_GID vscode \
13+ && chmod -R $USER_UID:$USER_GID /home/vscode ; \
1614 fi
1715
1816# [Optional] If your requirements rarely change, uncomment this section to add them to the image.
You can’t perform that action at this time.
0 commit comments