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

Commit 30f79f4

Browse files
authored
Merge pull request #40 from microsoft/clantz/ptrace
Highlight ptrace settings via commented out snippets in certain definitions
2 parents 8b24df6 + 9f7fd6e commit 30f79f4

File tree

54 files changed

+511
-160
lines changed

Some content is hidden

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

54 files changed

+511
-160
lines changed

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[*.json]
2+
indent_style = tab
3+
4+
[Dockerfile]
5+
indent_style = spaces
6+
indent_size = 4
7+
8+
[*.{yml,yaml}]
9+
indent_style = spaces
10+
indent_size = 2

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf
Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
11
{
2-
// "See https://aka.ms/vscode-remote/devcontainer.json for format details."
3-
"name": "Dev Container Definition Template - Docker Compose",
4-
"dockerComposeFile": "docker-compose.yml",
5-
"service": "your-service-name-here",
6-
"workspaceFolder": "/workspace",
7-
"shutdownAction": "stopCompose",
8-
"extensions": [
9-
"mutantdino.resourcemonitor"
10-
]
2+
// See https://aka.ms/vscode-remote/devcontainer.json for format details.
3+
"name": "Dev Container Definition Template - Docker Compose",
4+
5+
// Update the 'dockerComposeFile' list if you have more compose files or use different names.
6+
"dockerComposeFile": "docker-compose.yml",
7+
8+
// The 'service' property is the name of the service for the container that VS Code should
9+
// use. Update this value and .devcontainer/docker-compose.yml to the real service name.
10+
"service": "your-service-name-here",
11+
12+
// The optional 'workspaceFolder' property is the path VS Code should open by default when
13+
// connected. This is typically a volume mount in .devcontainer/docker-compose.yml
14+
"workspaceFolder": "/workspace",
15+
16+
// Add any extensions you want auto-installed here.
17+
"extensions": [],
18+
19+
// Update the value of this line to 'none' if you want to keep your containers running after VS Code shuts down.
20+
"shutdownAction": "stopCompose",
21+
22+
// Uncomment the next line to run commands after the container is created.
23+
// "postCreateCommand": ["uname -a"]
24+
1125
}

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

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ services:
99
# Using a Dockerfile is optional, but included for completeness.
1010
build:
1111
context: .
12-
dockerfile: .devcontainer/Dockerfile
12+
dockerfile: Dockerfile
1313

14-
# Application port(s) to expose
15-
ports:
16-
- "3000:3000"
14+
# Uncomment to expose one or more ports
15+
# ports:
16+
# - "3000:3000"
1717

1818
volumes:
1919
# This is where VS Code should expect to find your project's source code
@@ -23,6 +23,15 @@ services:
2323
# This lets you avoid setting up Git again in the container
2424
- ~/.gitconfig:/root/.gitconfig
2525

26-
# Overrides default command so things don't shut down after the process ends - useful for debugging
26+
# Uncomment the next line if you plan to install the Docker CLI. See the docker-in-docker-compose definition for details.
27+
# - /var/run/docker.sock:/var/run/docker.sock
28+
29+
# Uncomment the next four lines if you will use a ptrace-based debugger like C++, Go, and Rust.
30+
# cap_add:
31+
# - SYS_PTRACE
32+
# security_opt:
33+
# - seccomp:unconfined
34+
35+
# Overrides default command so things don't shut down after the process ends.
2736
command: sleep infinity
2837

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,26 @@
11
{
2-
// "See https://aka.ms/vscode-remote/devcontainer.json for format details."
3-
"name": "Dev Container Definition Template - Dockerfile",
4-
"dockerFile": "Dockerfile",
5-
"appPort": 3000,
6-
"extensions": [
7-
"mutantdino.resourcemonitor"
8-
],
9-
"runArgs": []
2+
// See https://aka.ms/vscode-remote/devcontainer.json for format details.
3+
"name": "Dev Container Definition Template - Dockerfile",
4+
5+
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
6+
"dockerFile": "Dockerfile",
7+
8+
// Use the optional 'appPort' property to publish any ports you want to access.
9+
"appPort": [],
10+
11+
// Add any extensions you want auto-installed here.
12+
"extensions": [],
13+
14+
// The optional 'runArgs' property can be used to specify additional runtime arguments.
15+
"runArgs": [
16+
// Uncomment the next line if you want to use Docker from the container. See the docker-in-docker definition for details.
17+
// "-v","/var/run/docker.sock:/var/run/docker.sock",
18+
19+
// Uncomment the next two lines if you will use a ptrace-based debugger like C++, Go, and Rust
20+
// "--cap-add=SYS_PTRACE",
21+
// "--security-opt", "seccomp=unconfined"
22+
],
23+
24+
// Uncomment the next line to run commands after the container is created.
25+
// "postCreateCommand": ["uname -a"]
1026
}
Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,26 @@
11
{
2-
// "See https://aka.ms/vscode-remote/devcontainer.json for format details."
3-
"name": "Dev Container Definition Template - Container Image",
4-
"image": "ubuntu:bionic",
5-
"appPort": 3000,
6-
"extensions": [
7-
"mutantdino.resourcemonitor"
8-
],
9-
"runArgs": []
2+
// See https://aka.ms/vscode-remote/devcontainer.json for format details.
3+
"name": "Dev Container Definition Template - Container Image",
4+
5+
// Update the 'image' property with your Docker image name.
6+
"image": "ubuntu:bionic",
7+
8+
// Use the optional 'appPort' property to publish any ports you want to access.
9+
"appPort": [],
10+
11+
// Add any extensions you want auto-installed here.
12+
"extensions": [],
13+
14+
// The optional 'runArgs' property can be used to specify additional runtime arguments.
15+
"runArgs": [
16+
// Uncomment the next line if you want to use Docker from the container. See the docker-in-docker definition for details.
17+
// "-v","/var/run/docker.sock:/var/run/docker.sock",
18+
19+
// Uncomment the next two lines if you will use a ptrace-based debugger like C++, Go, and Rust.
20+
// "--cap-add=SYS_PTRACE",
21+
// "--security-opt", "seccomp=unconfined"
22+
],
23+
24+
// Uncomment the next line to run commands after the container is created.
25+
// "postCreateCommand": ["uname -a"]
1026
}

containers/azure-cli/.devcontainer/devcontainer.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,11 @@
33
"dockerFile": "Dockerfile",
44
"extensions": [
55
"ms-vscode.azurecli"
6-
]
6+
],
7+
8+
// Uncomment the next line if you want to publish any ports.
9+
// "appPort": [],
10+
11+
// Uncomment the next line to run commands after the container is created.
12+
// "postCreateCommand": ["az --version"]
713
}

containers/azure-functions-dotnetcore-2.1/.devcontainer/devcontainer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,8 @@
55
"extensions": [
66
"ms-azuretools.vscode-azurefunctions",
77
"ms-vscode.csharp"
8-
]
8+
],
9+
10+
// Uncomment the next line to run commands after the container is created.
11+
// "postCreateCommand": ["dotnet restore"]
912
}

containers/azure-functions-dotnetcore-latest/.devcontainer/devcontainer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,8 @@
55
"extensions": [
66
"ms-azuretools.vscode-azurefunctions",
77
"ms-vscode.csharp"
8-
]
8+
],
9+
10+
// Uncomment the next line to run commands after the container is created.
11+
// "postCreateCommand": ["dotnet restore"]
912
}

containers/azure-functions-java-8/.devcontainer/devcontainer.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
"appPort": 7071,
55
"extensions": [
66
"ms-azuretools.vscode-azurefunctions",
7-
"vscjava.vscode-java-pack",
8-
"redhat.vscode-xml"
9-
]
7+
"vscjava.vscode-java-pack"
8+
],
9+
10+
// Uncomment the next line to run commands after the container is created.
11+
// "postCreateCommand": ["java -version"]
1012
}

0 commit comments

Comments
 (0)