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

Highlight ptrace settings via commented out snippets in certain definitions #40

Merged
merged 8 commits into from
May 9, 2019
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[*.json]
indent_style = tab

[Dockerfile]
indent_style = spaces
indent_size = 4

[*.{yml,yaml}]
indent_style = spaces
indent_size = 2
28 changes: 19 additions & 9 deletions container-templates/docker-compose/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
{
// "See https://aka.ms/vscode-remote/devcontainer.json for format details."
"name": "Dev Container Definition Template - Docker Compose",
"dockerComposeFile": "docker-compose.yml",
"service": "your-service-name-here",
"workspaceFolder": "/workspace",
"shutdownAction": "stopCompose",
"extensions": [
"mutantdino.resourcemonitor"
]
// 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",

// 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",

// 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.
Chuxel marked this conversation as resolved.
Show resolved Hide resolved
"shutdownAction": "stopCompose"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -23,6 +23,15 @@ services:
# This lets you avoid setting up Git again in the container
- ~/.gitconfig:/root/.gitconfig

# Overrides default command so things don't shut down after the process ends - useful for debugging
# Uncomment the next line 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 a ptrace-based debugger 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.
Chuxel marked this conversation as resolved.
Show resolved Hide resolved
command: sleep infinity

29 changes: 21 additions & 8 deletions container-templates/dockerfile/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
{
// "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": []
// 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
Chuxel marked this conversation as resolved.
Show resolved Hide resolved
"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 want to use Docker from the container. See the docker-in-docker definition for details.
// "-v","/var/run/docker.sock:/var/run/docker.sock",

// Uncomment the next two lines if you will use a ptrace-based debugger like C++, Go, and Rust
// "--cap-add=SYS_PTRACE",
// "--security-opt", "seccomp=unconfined"
]
}
29 changes: 21 additions & 8 deletions container-templates/image/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
{
// "See https://aka.ms/vscode-remote/devcontainer.json for format details."
"name": "Dev Container Definition Template - Container Image",
"image": "ubuntu:bionic",
"appPort": 3000,
"extensions": [
"mutantdino.resourcemonitor"
],
"runArgs": []
// 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",

// 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 want to use Docker from the container. See the docker-in-docker definition for details.
// "-v","/var/run/docker.sock:/var/run/docker.sock",

// Uncomment the next two lines if you will use a ptrace-based debugger like C++, Go, and Rust.
// "--cap-add=SYS_PTRACE",
// "--security-opt", "seccomp=unconfined"
]
}
7 changes: 6 additions & 1 deletion containers/debian-9-git/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"name": "Debian 9 & Git",
"dockerFile": "Dockerfile",
"appPort": []
"appPort": [],
"runArgs": [
// Uncomment the next two lines if you will use a ptrace-based debugger like C++, Go, and Rust.
// "--cap-add=SYS_PTRACE",
// "--security-opt", "seccomp=unconfined"
]
}
Original file line number Diff line number Diff line change
@@ -1,30 +1,25 @@
{
// "See https://aka.ms/vscode-remote/devcontainer.json for format details."
"name": "Existing Docker Compose (Extend)",
// "See https://aka.ms/vscode-remote/devcontainer.json for format details."
"name": "Existing Docker Compose (Extend)",

// "Update the 'dockerComposeFile' list if you have more compose files or use different names."
// "The .devcontainer/docker-compose.yml file contains any overrides you need/want to make."
"dockerComposeFile": [
"../docker-compose.yml",
"docker-compose.yml"
],

// "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",
// "Update the 'dockerComposeFile' list if you have more compose files or use different names."
// "The .devcontainer/docker-compose.yml file contains any overrides you need/want to make."
"dockerComposeFile": [
"../docker-compose.yml",
"docker-compose.yml"
],

// "The optional 'workspaceFolder' property is the path VS Code should open by default when"
// "connected. This is typically a file mount in .devcontainer/docker-compose.yml"
"workspaceFolder": "/workspace",
// "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",

// "Add any extensions you want auto-installed here."
"extensions": [],
// "The optional 'workspaceFolder' property is the path VS Code should open by default when"
// "connected. This is typically a file mount in .devcontainer/docker-compose.yml"
"workspaceFolder": "/workspace",

// "Remove this line 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."
}
// "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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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 next line 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 a ptrace-based debugger 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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
{
// "See https://aka.ms/vscode-remote/devcontainer.json for format details."
"name": "Existing Dockerfile",
// See https://aka.ms/vscode-remote/devcontainer.json for format details.
Chuxel marked this conversation as resolved.
Show resolved Hide resolved
"name": "Existing Dockerfile",

// "Sets the run context to one level up instead of the .devcontainer folder.
"context": "..",
// 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",

// "Use the optional 'appPort' property to expose ports not already in your Dockerfile"
"appPort": [],

// "Add any extensions you want auto-installed here."
"extensions": [],
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
"dockerFile": "Dockerfile",

// "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"]
}
// 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 want to use Docker from the container. See the docker-in-docker definition for details.
// "-v","/var/run/docker.sock:/var/run/docker.sock",

// Uncomment the next two lines if you will be using a ptrace-based debugger like C++, Go, and Rust.
// "--cap-add=SYS_PTRACE",
// "--security-opt", "seccomp=unconfined"
]
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "Docker in Docker Compose",
"dockerComposeFile": "docker-compose.yml",
"service": "docker-in-docker",
"workspaceFolder": "/workspace",
"shutdownAction": "stopCompose",
"extensions": [
"peterjausovec.vscode-docker"
]
}
"name": "Docker in Docker Compose",
"dockerComposeFile": "docker-compose.yml",
"service": "docker-in-docker",
"workspaceFolder": "/workspace",
"shutdownAction": "stopCompose",
"extensions": [
"peterjausovec.vscode-docker"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,23 @@ services:
build:
context: .
dockerfile: Dockerfile

volumes:
# Update this to wherever you want VS Code to mount the folder of your project
- ..:/workspace

# 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
Chuxel marked this conversation as resolved.
Show resolved Hide resolved
- /var/run/docker.sock:/var/run/docker.sock

# Overrides default command so things don't shut down after the process ends - useful for debugging

# Uncomment the next four lines if you will use a 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

19 changes: 12 additions & 7 deletions containers/docker-in-docker/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
{
"name": "Docker in Docker",
"dockerFile": "Dockerfile",
"extensions": [
"peterjausovec.vscode-docker"
],
"runArgs": ["-v","/var/run/docker.sock:/var/run/docker.sock"]
}
"name": "Docker in Docker",
"dockerFile": "Dockerfile",
"extensions": [
"peterjausovec.vscode-docker"
],
"runArgs": [
"-v", "/var/run/docker.sock:/var/run/docker.sock",
// Uncomment the next two lines if you will use a ptrace-based debugger like C++, Go, and Rust.
// "--cap-add=SYS_PTRACE",
// "--security-opt", "seccomp=unconfined"
]
}
10 changes: 8 additions & 2 deletions containers/kubernetes-helm/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@
"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 two lines if you will use a ptrace-based debugger like C++, Go, and Rust.
// "--cap-add=SYS_PTRACE",
// "--security-opt", "seccomp=unconfined"
]
}
7 changes: 6 additions & 1 deletion containers/ubuntu-18.04-git/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"name": "Ubuntu 18.04 & Git",
"dockerFile": "Dockerfile",
"appPort": []
"appPort": [],
"runArgs": [
// Uncomment the next two lines if you will use a ptrace-based debugger like C++, Go, and Rust.
// "--cap-add=SYS_PTRACE",
// "--security-opt", "seccomp=unconfined"
]
}