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

Commit dd13b3f

Browse files
committed
Add details for compose and remoteUser
1 parent 3a48000 commit dd13b3f

File tree

9 files changed

+35
-25
lines changed

9 files changed

+35
-25
lines changed

container-templates/docker-compose/.devcontainer/docker-compose.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@
66
version: '3'
77
services:
88
your-service-name-here:
9-
# Uncomment the next line to use a non-root user. On Linux, this will prevent
10-
# new files getting created as root, but you may need to update the USER_UID
11-
# and USER_GID in .devcontainer/Dockerfile to match your user if not 1000.
9+
# Uncomment the next line to use a non-root user for all processes. You can also
10+
# simply use the "remoteUser" property in devcontainer.json if you just want VS Code
11+
# and its sub-processes (terminals, tasks, debugging) to execute as the user. On Linux,
12+
# you may need to update USER_UID and USER_GID in .devcontainer/Dockerfile to match your
13+
# user if not 1000. See https://aka.ms/vscode-remote/containers/non-root for details.
1214
# user: vscode
1315

1416
# Using a Dockerfile is optional, but included for completeness.

containers/docker-existing-docker-compose/.devcontainer/docker-compose.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@ version: '3'
77
services:
88
# Update this to the name of the service you want to work with in your docker-compose.yml file
99
your-service-name-here:
10-
# You may want to add a non-root user to your Dockerfile. On Linux, this will prevent
11-
# new files getting created as root. See https://aka.ms/vscode-remote/containers/non-root-user
12-
# for the needed Dockerfile updates and then uncomment the next line.
10+
# You may want to add a non-root user to your Dockerfile and uncomment the line below
11+
# to cause all processes to run as this user. Once present, you can also simply
12+
# use the "remoteUser" property in devcontainer.json if you just want VS Code and
13+
# its sub-processes (terminals, tasks, debugging) to execute as the user. On Linux,
14+
# you may need to ensure the UID and GID of the container user you create matches your
15+
# local user. See https://aka.ms/vscode-remote/containers/non-root for details.
1316
# user: vscode
1417

1518
# Uncomment if you want to add a different Dockerfile in the .devcontainer folder

containers/docker-in-docker-compose/.devcontainer/docker-compose.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@
66
version: '3'
77
services:
88
docker-in-docker:
9-
# Uncomment the next line to use a non-root user. On Linux, this will prevent
10-
# new files getting created as root, but you may need to update the USER_UID
11-
# and USER_GID in .devcontainer/Dockerfile to match your user if not 1000.
9+
# Uncomment the next line to use a non-root user for all processes. You can also
10+
# simply use the "remoteUser" property in devcontainer.json if you just want VS Code
11+
# and its sub-processes (terminals, tasks, debugging) to execute as the user. On Linux,
12+
# you may need to update USER_UID and USER_GID in .devcontainer/Dockerfile to match your
13+
# user if not 1000. See https://aka.ms/vscode-remote/containers/non-root for details.
1214
# user: vscode
1315

1416
build:

containers/javascript-node-12-mongo/.devcontainer/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ FROM node:12
99
ENV DEBIAN_FRONTEND=noninteractive
1010

1111
# The node image includes a non-root user with sudo access. Use the "remoteUser"
12-
# property in devcontainer.json to use it. On Linux, the container user's GID/UIDs
13-
# will be updated to match your local UID/GID (when using the dockerFile property).
12+
# property in devcontainer.json to use it.
1413
# See https://aka.ms/vscode-remote/containers/non-root-user for details.
1514
ARG USERNAME=node
1615
ARG USER_UID=1000

containers/javascript-node-12-mongo/.devcontainer/docker-compose.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@
66
version: '3'
77
services:
88
web:
9-
# Uncomment the next line to use a non-root user. On Linux, this will prevent
10-
# new files getting created as root, but you may need to update the USER_UID
11-
# and USER_GID in .devcontainer/Dockerfile to match your user if not 1000.
9+
# Uncomment the next line to use a non-root user for all processes. You can also
10+
# simply use the "remoteUser" property in devcontainer.json if you just want VS Code
11+
# and its sub-processes (terminals, tasks, debugging) to execute as the user. On Linux,
12+
# you may need to update USER_UID and USER_GID in .devcontainer/Dockerfile to match your
13+
# user if not 1000. See https://aka.ms/vscode-remote/containers/non-root for details.
1214
# user: node
1315

1416
build:

containers/javascript-node-12-postgres/.devcontainer/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ FROM node:12
99
ENV DEBIAN_FRONTEND=noninteractive
1010

1111
# The node image includes a non-root user with sudo access. Use the "remoteUser"
12-
# property in devcontainer.json to use it. On Linux, the container user's GID/UIDs
13-
# will be updated to match your local UID/GID (when using the dockerFile property).
12+
# property in devcontainer.json to use it.
1413
# See https://aka.ms/vscode-remote/containers/non-root-user for details.
1514
ARG USERNAME=node
1615
ARG USER_UID=1000

containers/javascript-node-12-postgres/.devcontainer/docker-compose.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@
66
version: '3'
77
services:
88
web:
9-
# Uncomment the next line to use a non-root user. On Linux, this will prevent
10-
# new files getting created as root, but you may need to update the USER_UID
11-
# and USER_GID in .devcontainer/Dockerfile to match your user if not 1000.
9+
# Uncomment the next line to use a non-root user for all processes. You can also
10+
# simply use the "remoteUser" property in devcontainer.json if you just want VS Code
11+
# and its sub-processes (terminals, tasks, debugging) to execute as the user. On Linux,
12+
# you may need to update USER_UID and USER_GID in .devcontainer/Dockerfile to match your
13+
# user if not 1000. See https://aka.ms/vscode-remote/containers/non-root for details.
1214
# user: node
1315

1416
build:

containers/python-3-postgres/.devcontainer/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ ENV DEBIAN_FRONTEND=noninteractive
1010

1111
ENV PYTHONUNBUFFERED 1
1212

13-
# This Dockerfile adds a non-root user with sudo access. Use the "remoteUser"
14-
# property in devcontainer.json to use it. On Linux, the container user's GID/UIDs
15-
# will be updated to match your local UID/GID (when using the dockerFile property).
13+
# The node image includes a non-root user with sudo access. Use the "remoteUser"
14+
# property in devcontainer.json to use it.
1615
# See https://aka.ms/vscode-remote/containers/non-root-user for details.
1716
ARG USERNAME=vscode
1817
ARG USER_UID=1000

containers/python-3-postgres/.devcontainer/docker-compose.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ version: '3'
22

33
services:
44
app:
5-
# Uncomment the next line to use a non-root user. On Linux, this will prevent
6-
# new files getting created as root, but you may need to update the USER_UID
7-
# and USER_GID in .devcontainer/Dockerfile to match your user if not 1000.
5+
# Uncomment the next line to use a non-root user for all processes. You can also
6+
# simply use the "remoteUser" property in devcontainer.json if you just want
7+
# VS Code and its sub-processes (terminals, tasks, debugging) to execute as the user
8+
# On Linux, you may need to update the USER_UID and USER_GID in .devcontainer/Dockerfile
9+
# to match your user if not 1000. See https://aka.ms/vscode-remote/containers/non-root for details.
810
# user: vscode
911

1012
build:

0 commit comments

Comments
 (0)