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

Commit 8e2f4b4

Browse files
authored
Merge pull request #163 from microsoft/clantz/1.41-props
Updates to take advantage of new devcontainer.json properties in Remote - Containers
2 parents ae4ead9 + 6ee87dd commit 8e2f4b4

File tree

125 files changed

+778
-751
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+778
-751
lines changed

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
44
#-------------------------------------------------------------------------------------------------------------
55

6-
# ********************************************************
7-
# * Note: A Docker is optional when using Docker Compose *
8-
# * but has been included here for completeness. *
9-
# ********************************************************
6+
# **********************************************************
7+
# * Note: Using a Dockerfile is optional when using Docker *
8+
# * Compose but has been included here for completeness. *
9+
# **********************************************************
1010

1111
FROM debian:9
1212

1313
# Avoid warnings by switching to noninteractive
1414
ENV DEBIAN_FRONTEND=noninteractive
1515

16-
# This Dockerfile adds a non-root 'vscode' user with sudo access. However, for Linux,
17-
# this user's GID/UID must match your local user UID/GID to avoid permission issues
18-
# with bind mounts. Update USER_UID / USER_GID if yours is not 1000. See
19-
# https://aka.ms/vscode-remote/containers/non-root-user for details.
16+
# This Dockerfile adds a non-root user with sudo access. Use the "remoteUser"
17+
# property in devcontainer.json to use it. On Linux, the container user's GID/UIDs
18+
# will be updated to match your local UID/GID (when using the dockerFile property).
19+
# See https://aka.ms/vscode-remote/containers/non-root-user for details.
2020
ARG USERNAME=vscode
2121
ARG USER_UID=1000
2222
ARG USER_GID=$USER_UID
@@ -32,7 +32,7 @@ RUN apt-get update \
3232
# * Add steps for installing needed dependencies here *
3333
# *****************************************************
3434
#
35-
# Create a non-root user to use if preferred - see https://aka.ms/vscode-remote/containers/non-root-user.
35+
# Create a non-root user
3636
&& groupadd --gid $USER_GID $USERNAME \
3737
&& useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \
3838
# [Optional] Add sudo support for the non-root user

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@
2626
// "shutdownAction": "none",
2727

2828
// Uncomment the next line to run commands after the container is created.
29-
// "postCreateCommand": "uname -a"
29+
// "postCreateCommand": "uname -a",
30+
31+
// Uncomment the next line to have VS Code connect as an existing non-root user in the container. See
32+
// https://aka.ms/vscode-remote/containers/non-root for details on adding a non-root user if none exist.
33+
// "remoteUser": "vscode",
3034

3135
// Add the IDs of extensions you want installed when the container is created in the array below.
3236
"extensions": []

container-templates/dockerfile/.devcontainer/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ FROM debian:9
88
# Avoid warnings by switching to noninteractive
99
ENV DEBIAN_FRONTEND=noninteractive
1010

11-
# This Dockerfile adds a non-root 'vscode' user with sudo access. However, for Linux,
12-
# this user's GID/UID must match your local user UID/GID to avoid permission issues
13-
# with bind mounts. Update USER_UID / USER_GID if yours is not 1000. See
14-
# https://aka.ms/vscode-remote/containers/non-root-user for details.
11+
# This Dockerfile adds 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).
14+
# See https://aka.ms/vscode-remote/containers/non-root-user for details.
1515
ARG USERNAME=vscode
1616
ARG USER_UID=1000
1717
ARG USER_GID=$USER_UID
@@ -27,7 +27,7 @@ RUN apt-get update \
2727
# * Add steps for installing needed dependencies here *
2828
# *****************************************************
2929
#
30-
# Create a non-root user to use if preferred - see https://aka.ms/vscode-remote/containers/non-root-user.
30+
# Create a non-root user
3131
&& groupadd --gid $USER_GID $USERNAME \
3232
&& useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \
3333
# [Optional] Add sudo support for the non-root user

container-templates/dockerfile/.devcontainer/devcontainer.json

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,6 @@
44
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
55
"dockerFile": "Dockerfile",
66

7-
// The optional 'runArgs' property can be used to specify additional runtime arguments.
8-
"runArgs": [
9-
// Uncomment the next line to use Docker from inside the container. See https://aka.ms/vscode-remote/samples/docker-in-docker for details.
10-
// "-v","/var/run/docker.sock:/var/run/docker.sock",
11-
12-
// Uncomment the next line if you will use a ptrace-based debugger like C++, Go, and Rust
13-
// "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined",
14-
15-
// Uncomment the next line to use a non-root user. On Linux, this will prevent
16-
// new files getting created as root, but you may need to update the USER_UID
17-
// and USER_GID in .devcontainer/Dockerfile to match your user if not 1000.
18-
// "-u", "vscode"
19-
],
20-
217
// Use 'settings' to set *default* container specific settings.json values on container create.
228
// You can edit these settings after create using File > Preferences > Settings > Remote.
239
"settings": {
@@ -32,6 +18,17 @@
3218
// Uncomment the next line to run commands after the container is created.
3319
// "postCreateCommand": "uname -a",
3420

21+
// Uncomment the next line to use Docker from inside the container. See https://aka.ms/vscode-remote/samples/docker-in-docker for details.
22+
// "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ],
23+
24+
// Uncomment the next line if you will use a ptrace-based debugger like C++, Go, and Rust
25+
// "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
26+
27+
// Uncomment the next line to have VS Code connect as an existing non-root user in the container.
28+
// On Linux, by default, the container user's UID/GID will be updated to match your local user. See
29+
// https://aka.ms/vscode-remote/containers/non-root for details on adding a non-root user if none exist.
30+
// "remoteUser": "vscode",
31+
3532
// Add the IDs of extensions you want installed when the container is created in the array below.
3633
"extensions": []
3734
}

container-templates/image/.devcontainer/devcontainer.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,6 @@
44
// Update the 'image' property with your Docker image name.
55
"image": "ubuntu:18.04",
66

7-
// The optional 'runArgs' property can be used to specify additional runtime arguments.
8-
"runArgs": [
9-
// Uncomment the line if you will use a ptrace-based debugger like C++, Go, and Rust.
10-
// "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined",
11-
12-
// Uncomment the next line to use a non-root user. On Linux, this will prevent
13-
// new files getting created as root, but you may need to update the USER_UID
14-
// and USER_GID in .devcontainer/Dockerfile to match your user if not 1000.
15-
// "-u", "vscode"
16-
],
17-
187
// Use 'settings' to set *default* container specific settings.json values on container create.
198
// You can edit these settings after create using File > Preferences > Settings > Remote.
209
"settings": {
@@ -29,6 +18,17 @@
2918
// Uncomment the next line to run commands after the container is created - like installing git
3019
// "postCreateCommand": "apt-get update && apt-get install -y git",
3120

21+
// Uncomment the next line to use Docker from inside the container. See https://aka.ms/vscode-remote/samples/docker-in-docker for details.
22+
// "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ],
23+
24+
// Uncomment the next line if you will use a ptrace-based debugger like C++, Go, and Rust
25+
// "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
26+
27+
// Uncomment the next line to have VS Code connect as an existing non-root user in the container.
28+
// On Linux, by default, the container user's UID/GID will be updated to match your local user. See
29+
// https://aka.ms/vscode-remote/containers/non-root for details on adding a non-root user if none exist.
30+
// "remoteUser": "vscode",
31+
3232
// Add the IDs of extensions you want installed when the container is created in the array below.
3333
"extensions": []
3434
}

containers/alpine-3.10-git/.devcontainer/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
#-------------------------------------------------------------------------------------------------------------
55
FROM alpine:3.10
66

7-
# This Dockerfile adds a non-root 'vscode' user with sudo access. However, for Linux,
8-
# this user's GID/UID must match your local user UID/GID to avoid permission issues
9-
# with bind mounts. Update USER_UID / USER_GID if yours is not 1000. See
10-
# https://aka.ms/vscode-remote/containers/non-root-user for details.
7+
# This Dockerfile adds a non-root user with sudo access. Use the "remoteUser"
8+
# property in devcontainer.json to use it. On Linux, the container user's GID/UIDs
9+
# will be updated to match your local UID/GID (when using the dockerFile property).
10+
# See https://aka.ms/vscode-remote/containers/non-root-user for details.
1111
ARG USERNAME=vscode
1212
ARG USER_UID=1000
1313
ARG USER_GID=$USER_UID

containers/alpine-3.10-git/.devcontainer/devcontainer.json

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,14 @@
22
"name": "Alpine 3.10",
33
"dockerFile": "Dockerfile",
44

5-
"runArgs": [
6-
// Uncomment the line if you will use a ptrace-based debugger like Go.
7-
// "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined",
8-
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.
12-
// "-u", "vscode"
13-
],
5+
// Uncomment the next line to have VS Code connect as an existing non-root user in the container.
6+
// On Linux, by default, the container user's UID/GID will be updated to match your local user. See
7+
// https://aka.ms/vscode-remote/containers/non-root for details on adding a non-root user if none exist.
8+
// "remoteUser": "vscode",
149

10+
// Uncomment the next line if you will use a ptrace-based debugger like C++, Go, and Rust
11+
// "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
12+
1513
// Use 'settings' to set *default* container specific settings.json values on container create.
1614
// You can edit these settings after create using File > Preferences > Settings > Remote.
1715
"settings": {

containers/azure-ansible/.devcontainer/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ FROM debian:9
99
# Avoid warnings by switching to noninteractive
1010
ENV DEBIAN_FRONTEND=noninteractive
1111

12-
# This Dockerfile adds a non-root 'vscode' user with sudo access. However, for Linux,
13-
# this user's GID/UID must match your local user UID/GID to avoid permission issues
14-
# with bind mounts. Update USER_UID / USER_GID if yours is not 1000. See
15-
# https://aka.ms/vscode-remote/containers/non-root-user for details.
12+
# This Dockerfile adds a non-root user with sudo access. Use the "remoteUser"
13+
# property in devcontainer.json to use it. On Linux, the container user's GID/UIDs
14+
# will be updated to match your local UID/GID (when using the dockerFile property).
15+
# See https://aka.ms/vscode-remote/containers/non-root-user for details.
1616
ARG USERNAME=vscode
1717
ARG USER_UID=1000
1818
ARG USER_GID=$USER_UID

containers/azure-ansible/.devcontainer/devcontainer.json

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
11
{
22
"name": "Azure Ansible",
33
"dockerFile": "Dockerfile",
4-
"runArgs": [
5-
// Uncomment the next line if you will use a ptrace-based debugger like C++, Go, and Rust.
6-
// "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined",
74

8-
// Uncomment the next line to use a non-root user. On Linux, this will prevent
9-
// new files getting created as root, but you may need to update the USER_UID
10-
// and USER_GID in .devcontainer/Dockerfile to match your user if not 1000.
11-
// "-u", "vscode",
5+
// Uncomment the next line to have VS Code connect as an existing non-root user in the container.
6+
// On Linux, by default, the container user's UID/GID will be updated to match your local user. See
7+
// https://aka.ms/vscode-remote/containers/non-root for details on adding a non-root user if none exist.
8+
// "remoteUser": "vscode",
129

13-
"-v", "/var/run/docker.sock:/var/run/docker.sock"
10+
// Uncomment the next line if you will use a ptrace-based debugger like C++, Go, and Rust
11+
// "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
12+
13+
"mounts": [
14+
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind"
1415
],
1516

1617
// Use 'settings' to set *default* container specific settings.json values on container create.
1718
// You can edit these settings after create using File > Preferences > Settings > Remote.
1819
"settings": {
19-
"terminal.integrated.shell.linux": "/bin/bash",
20-
"remote.extensionKind": {
21-
"ms-azuretools.vscode-docker": "workspace"
22-
}
20+
"terminal.integrated.shell.linux": "/bin/bash"
2321
},
2422

2523
// Use 'appPort' to create a container with published ports. If the port isn't working, be sure

containers/azure-blockchain/.devcontainer/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ FROM python:2.7-stretch
88
# Avoid warnings by switching to noninteractive
99
ENV DEBIAN_FRONTEND=noninteractive
1010

11-
# This Dockerfile adds a non-root 'vscode' user with sudo access. However, for Linux,
12-
# this user's GID/UID must match your local user UID/GID to avoid permission issues
13-
# with bind mounts. Update USER_UID / USER_GID if yours is not 1000. See
14-
# https://aka.ms/vscode-remote/containers/non-root-user for details.
11+
# This Dockerfile adds 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).
14+
# See https://aka.ms/vscode-remote/containers/non-root-user for details.
1515
ARG USERNAME=vscode
1616
ARG USER_UID=1000
1717
ARG USER_GID=$USER_UID

0 commit comments

Comments
 (0)