diff --git a/container-templates/docker-compose/.devcontainer/devcontainer.json b/container-templates/docker-compose/.devcontainer/devcontainer.json index a705f218ad..732fdab4d3 100644 --- a/container-templates/docker-compose/.devcontainer/devcontainer.json +++ b/container-templates/docker-compose/.devcontainer/devcontainer.json @@ -1,11 +1,21 @@ { - // "See https://aka.ms/vscode-remote/devcontainer.json for format details." + // See https://aka.ms/vscode-remote/devcontainer.json for format details. "name": "Dev Container Definition Template - Docker Compose", + + // Update the 'dockerComposeFile' list if you have more compose files or use different names. "dockerComposeFile": "docker-compose.yml", - "service": "your-service-name-here", + + // The 'service' property is the name of the service for the container that VS Code should + // use. Update this value and .devcontainer/docker-compose.yml to the real service name. + "service": "your-service-name-here", + + // The optional 'workspaceFolder' property is the path VS Code should open by default when + // connected. This is typically a volume mount in .devcontainer/docker-compose.yml "workspaceFolder": "/workspace", - "shutdownAction": "stopCompose", - "extensions": [ - "mutantdino.resourcemonitor" - ] -} \ No newline at end of file + + // Add any extensions you want auto-installed here. + "extensions": [], + + // Update the value of this line like to 'none' if you want to keep your containers running after VS Code shuts down. + "shutdownAction": "stopCompose" +} diff --git a/container-templates/docker-compose/.devcontainer/docker-compose.yml b/container-templates/docker-compose/.devcontainer/docker-compose.yml index e2c14ea023..67f30b0cf0 100644 --- a/container-templates/docker-compose/.devcontainer/docker-compose.yml +++ b/container-templates/docker-compose/.devcontainer/docker-compose.yml @@ -9,11 +9,11 @@ services: # Using a Dockerfile is optional, but included for completeness. build: context: . - dockerfile: .devcontainer/Dockerfile + dockerfile: Dockerfile - # Application port(s) to expose - ports: - - "3000:3000" + # Uncomment to expose one or more ports + # ports: + # - "3000:3000" volumes: # This is where VS Code should expect to find your project's source code @@ -23,6 +23,12 @@ services: # This lets you avoid setting up Git again in the container - ~/.gitconfig:/root/.gitconfig + # Uncomment the next four lines if you will use ptrace-based debuggers like C++, Go, and Rust + # cap_add: + # - SYS_PTRACE + # security_opt: + # - seccomp:unconfined + # Overrides default command so things don't shut down after the process ends - useful for debugging command: sleep infinity diff --git a/container-templates/dockerfile/.devcontainer/devcontainer.json b/container-templates/dockerfile/.devcontainer/devcontainer.json index fa4c7fd920..a0087c39ec 100644 --- a/container-templates/dockerfile/.devcontainer/devcontainer.json +++ b/container-templates/dockerfile/.devcontainer/devcontainer.json @@ -1,10 +1,24 @@ { - // "See https://aka.ms/vscode-remote/devcontainer.json for format details." - "name": "Dev Container Definition Template - Dockerfile", - "dockerFile": "Dockerfile", - "appPort": 3000, - "extensions": [ - "mutantdino.resourcemonitor" - ], - "runArgs": [] -} \ No newline at end of file + // See https://aka.ms/vscode-remote/devcontainer.json for format details. + "name": "Dev Container Definition Template - Dockerfile", + + // Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename. + "dockerFile": "Dockerfile", + + // Use the optional 'appPort' property to expose ports not already in your Dockerfile + "appPort": [], + + // Add any extensions you want auto-installed here. + "extensions": [], + + // The optional 'runArgs' property can be used to specify additional runtime arguments. + "runArgs": [ + // Uncomment the next line if you plan to install the Docker CLI. See the Docker in Docker definition for details + // "-v","/var/run/docker.sock:/var/run/docker.sock", + + // Uncomment the next three lines if you will be using a ptrace-based debuggers like C++, Go, and Rust. + // "--cap-add=SYS_PTRACE", + // "--security-opt", + /// "seccomp=unconfined" + ] +} diff --git a/container-templates/image/.devcontainer/devcontainer.json b/container-templates/image/.devcontainer/devcontainer.json index fe4381bee7..86645dbf48 100644 --- a/container-templates/image/.devcontainer/devcontainer.json +++ b/container-templates/image/.devcontainer/devcontainer.json @@ -1,10 +1,25 @@ { - // "See https://aka.ms/vscode-remote/devcontainer.json for format details." + // See https://aka.ms/vscode-remote/devcontainer.json for format details. "name": "Dev Container Definition Template - Container Image", + + // Update the 'image' property with your Docker image name. "image": "ubuntu:bionic", - "appPort": 3000, - "extensions": [ - "mutantdino.resourcemonitor" - ], - "runArgs": [] -} \ No newline at end of file + + // Use the optional 'appPort' property to expose ports not already in your Dockerfile + "appPort": [], + + // Add any extensions you want auto-installed here. + "extensions": [], + + // The optional 'runArgs' property can be used to specify additional runtime arguments. + "runArgs": [ + // Uncomment the next line if you plan to install the Docker CLI. See the Docker in Docker definition for details + // "-v","/var/run/docker.sock:/var/run/docker.sock", + + // Uncomment the next three lines if you will be using a ptrace-based debuggers like C++, Go, and Rust. + // "--cap-add=SYS_PTRACE", + // "--security-opt", + /// "seccomp=unconfined" + ] + +} diff --git a/containers/debian-9-git/.devcontainer/devcontainer.json b/containers/debian-9-git/.devcontainer/devcontainer.json index f986012af0..09b74fae0f 100644 --- a/containers/debian-9-git/.devcontainer/devcontainer.json +++ b/containers/debian-9-git/.devcontainer/devcontainer.json @@ -1,5 +1,14 @@ { "name": "Debian 9 & Git", "dockerFile": "Dockerfile", - "appPort": [] + "appPort": [], + "runArgs": [ + // Uncomment the next line if you plan to install the Docker CLI. See the Docker in Docker definition for details + // "-v","/var/run/docker.sock:/var/run/docker.sock", + + // Uncomment the next three lines if you will be using a ptrace-based debuggers like C++, Go, and Rust. + // "--cap-add=SYS_PTRACE", + // "--security-opt", + /// "seccomp=unconfined" + ] } \ No newline at end of file diff --git a/containers/docker-existing-docker-compose/.devcontainer/devcontainer.json b/containers/docker-existing-docker-compose/.devcontainer/devcontainer.json index 16d834f0eb..6a08d26a91 100644 --- a/containers/docker-existing-docker-compose/.devcontainer/devcontainer.json +++ b/containers/docker-existing-docker-compose/.devcontainer/devcontainer.json @@ -20,11 +20,6 @@ // "Add any extensions you want auto-installed here." "extensions": [], - // "Remove this line if you want to keep your containers running after VS Code shuts down." + // "Update the value of this line like to 'none' if you want to keep your containers running after VS Code shuts down." "shutdownAction": "stopCompose" - - // "Other notes:" - // "- The 'appPorts' property is not supported in the Docker Compose case. Add the ports into" - // " the docker-compose.yml in the .devcontainer folder instead." - // "- The 'runArgs' property is also not supported." } diff --git a/containers/docker-existing-docker-compose/.devcontainer/docker-compose.yml b/containers/docker-existing-docker-compose/.devcontainer/docker-compose.yml index 8ff1e825be..75da0bf3ff 100644 --- a/containers/docker-existing-docker-compose/.devcontainer/docker-compose.yml +++ b/containers/docker-existing-docker-compose/.devcontainer/docker-compose.yml @@ -23,9 +23,14 @@ services: # This lets you avoid setting up Git again in the container - ~/.gitconfig:/root/.gitconfig - # Forwarding the socket is optional, but lets docker work inside the container if you install the Docker CLI. - # See the docker-in-docker-compose definition for details on how to install it. - - /var/run/docker.sock:/var/run/docker.sock + # Uncomment the line below if you plan to install the Docker CLI. See the docker-in-docker-compose definition for details. + # - /var/run/docker.sock:/var/run/docker.sock + + # Uncomment the next four lines if you will use ptrace-based debuggers like C++, Go, and Rust + # cap_add: + # - SYS_PTRACE + # security_opt: + # - seccomp:unconfined # Overrides default command so things don't shut down after the process ends - useful for debugging command: sleep infinity diff --git a/containers/docker-existing-dockerfile/.devcontainer/devcontainer.json b/containers/docker-existing-dockerfile/.devcontainer/devcontainer.json index 1db8820e86..ffdaea4d69 100644 --- a/containers/docker-existing-dockerfile/.devcontainer/devcontainer.json +++ b/containers/docker-existing-dockerfile/.devcontainer/devcontainer.json @@ -1,22 +1,27 @@ { - // "See https://aka.ms/vscode-remote/devcontainer.json for format details." + // See https://aka.ms/vscode-remote/devcontainer.json for format details. "name": "Existing Dockerfile", - // "Sets the run context to one level up instead of the .devcontainer folder. + // Sets the run context to one level up instead of the .devcontainer folder. "context": "..", - // "Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename." - "dockerFile": "Dockerfile", + // Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename. + "dockerFile": "Dockerfile", - // "Use the optional 'appPort' property to expose ports not already in your Dockerfile" + // Use the optional 'appPort' property to expose ports not already in your Dockerfile "appPort": [], - // "Add any extensions you want auto-installed here." + // Add any extensions you want auto-installed here. "extensions": [], - // "The optional 'runArgs' property can be used to specify Docker CLI arguments to use when the container." - // "is started. If you install the Docker CE CLI in your container, the runArgs list below will lets you interact" - // "with your host's Docker service from inside the container. See the docker-in-docker and docker-in-docker" - // "definitions for details." - "runArgs": ["-v","/var/run/docker.sock:/var/run/docker.sock"] + // The optional 'runArgs' property can be used to specify additional runtime arguments. + "runArgs": [ + // Uncomment the next line if you plan to install the Docker CLI. See the Docker in Docker definition for details + // "-v","/var/run/docker.sock:/var/run/docker.sock", + + // Uncomment the next three lines if you will be using a ptrace-based debuggers like C++, Go, and Rust. + // "--cap-add=SYS_PTRACE", + // "--security-opt", + /// "seccomp=unconfined" + ] } diff --git a/containers/docker-in-docker-compose/.devcontainer/docker-compose.yml b/containers/docker-in-docker-compose/.devcontainer/docker-compose.yml index e0b278aba8..5b4bb814b0 100644 --- a/containers/docker-in-docker-compose/.devcontainer/docker-compose.yml +++ b/containers/docker-in-docker-compose/.devcontainer/docker-compose.yml @@ -9,6 +9,7 @@ services: build: context: . dockerfile: Dockerfile + volumes: # Update this to wherever you want VS Code to mount the folder of your project - ..:/workspace @@ -16,10 +17,15 @@ services: # This lets you avoid setting up Git again in the container - ~/.gitconfig:/root/.gitconfig - # Forwarding the socket is optional, but lets docker work inside the container if you install the Docker CLI. - # See the docker-in-docker-compose definition for details on how to install it. + # Forwards the Docker socket from one side ot the other - /var/run/docker.sock:/var/run/docker.sock - + + # Uncomment the next four lines if you will use ptrace-based debuggers like C++, Go, and Rust + # cap_add: + # - SYS_PTRACE + # security_opt: + # - seccomp:unconfined + # Overrides default command so things don't shut down after the process ends - useful for debugging command: sleep infinity diff --git a/containers/docker-in-docker/.devcontainer/devcontainer.json b/containers/docker-in-docker/.devcontainer/devcontainer.json index 1a0508d477..29d78c92b9 100644 --- a/containers/docker-in-docker/.devcontainer/devcontainer.json +++ b/containers/docker-in-docker/.devcontainer/devcontainer.json @@ -4,5 +4,12 @@ "extensions": [ "peterjausovec.vscode-docker" ], - "runArgs": ["-v","/var/run/docker.sock:/var/run/docker.sock"] + "runArgs": [ + "-v","/var/run/docker.sock:/var/run/docker.sock", + + // Uncomment the next three lines if you will be using a ptrace-based debuggers like C++, Go, and Rust. + // "--cap-add=SYS_PTRACE", + // "--security-opt", + /// "seccomp=unconfined" + ] } diff --git a/containers/kubernetes-helm/.devcontainer/devcontainer.json b/containers/kubernetes-helm/.devcontainer/devcontainer.json index 2ffdc300f9..6a2caba28b 100644 --- a/containers/kubernetes-helm/.devcontainer/devcontainer.json +++ b/containers/kubernetes-helm/.devcontainer/devcontainer.json @@ -5,7 +5,14 @@ "peterjausovec.vscode-docker", "ms-kubernetes-tools.vscode-kubernetes-tools" ], - "runArgs": ["-e", "SYNC_LOCALHOST_KUBECONFIG=true", + "runArgs": [ + "-e", "SYNC_LOCALHOST_KUBECONFIG=true", "-v", "/var/run/docker.sock:/var/run/docker.sock", - "-v", "${env:HOME}${env:USERPROFILE}/.kube:/root/.kube-localhost"] + "-v", "${env:HOME}${env:USERPROFILE}/.kube:/root/.kube-localhost", + + // Uncomment the next three lines if you will be using a ptrace-based debuggers like C++, Go, and Rust. + // "--cap-add=SYS_PTRACE", + // "--security-opt", + /// "seccomp=unconfined" + ] } \ No newline at end of file diff --git a/containers/ubuntu-18.04-git/.devcontainer/devcontainer.json b/containers/ubuntu-18.04-git/.devcontainer/devcontainer.json index 442ad86af0..ed649a52c8 100644 --- a/containers/ubuntu-18.04-git/.devcontainer/devcontainer.json +++ b/containers/ubuntu-18.04-git/.devcontainer/devcontainer.json @@ -1,5 +1,14 @@ { "name": "Ubuntu 18.04 & Git", "dockerFile": "Dockerfile", - "appPort": [] + "appPort": [], + "runArgs": [ + // Uncomment the next line if you plan to install the Docker CLI. See the Docker in Docker definition for details + // "-v","/var/run/docker.sock:/var/run/docker.sock", + + // Uncomment the next three lines if you will be using a ptrace-based debuggers like C++, Go, and Rust. + // "--cap-add=SYS_PTRACE", + // "--security-opt", + /// "seccomp=unconfined" + ] } \ No newline at end of file