Skip to content

Commit 847debb

Browse files
committed
Add devcontainer config for dev
Signed-off-by: yuguorui <yuguorui@pku.edu.cn>
1 parent 0e9e2e1 commit 847debb

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/rust
3+
{
4+
"name": "Rust",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/rust:1-1-bookworm",
7+
"features": {
8+
"ghcr.io/devcontainers/features/python:1": {}
9+
},
10+
"runArgs": ["--privileged"],
11+
"capAdd": ["NET_ADMIN", "SYS_PTRACE"],
12+
13+
// Use 'mounts' to make the cargo cache persistent in a Docker Volume.
14+
"mounts": [
15+
{
16+
"source": "/Users/yuguorui/Code/fast-socks5",
17+
"target": "/workspaces/fast-socks5",
18+
"type": "bind"
19+
}
20+
]
21+
22+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
23+
// "forwardPorts": [],
24+
25+
// Use 'postCreateCommand' to run commands after the container is created.
26+
,"postCreateCommand": "apt-get update && apt-get install -y iptables"
27+
28+
// Configure tool-specific properties.
29+
// "customizations": {},
30+
31+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
32+
,"remoteUser": "root"
33+
}

0 commit comments

Comments
 (0)