Skip to content

Commit dc0adce

Browse files
Merge pull request #21 from theseus-rs/add-dev-container
feat: add devcontainer support
2 parents 99eb587 + b10baab commit dc0adce

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed

.devcontainer/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ARG VARIANT="bullseye"
2+
FROM mcr.microsoft.com/vscode/devcontainers/rust:1-${VARIANT}

.devcontainer/devcontainer.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"name": "Rust",
3+
"build": {
4+
"dockerfile": "Dockerfile",
5+
"args": {
6+
"VARIANT": "bullseye"
7+
}
8+
},
9+
"runArgs": [
10+
"--cap-add=SYS_PTRACE",
11+
"--security-opt",
12+
"seccomp=unconfined"
13+
],
14+
15+
"customizations": {
16+
"vscode": {
17+
"settings": {
18+
"lldb.executable": "/usr/bin/lldb",
19+
"files.watcherExclude": {
20+
"**/target/**": true
21+
},
22+
"rust-analyzer.checkOnSave.command": "clippy"
23+
},
24+
25+
// Add the IDs of extensions you want installed when the container is created.
26+
"extensions": [
27+
"mutantdino.resourcemonitor",
28+
"rust-lang.rust-analyzer",
29+
"serayuzgur.crates",
30+
"tamasfe.even-better-toml",
31+
"vadimcn.vscode-lldb"
32+
]
33+
}
34+
},
35+
36+
"remoteUser": "vscode"
37+
}

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,20 @@ Unless you explicitly state otherwise, any contribution intentionally submitted
5858
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any
5959
additional terms or conditions.
6060

61+
<a href="https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/theseus-rs/postgresql-embedded">
62+
<img
63+
src="https://img.shields.io/static/v1?label=Local%20Dev%20Container&logo=visualstudiocode&message=Open&color=orange"
64+
alt="VSCode Development Container"
65+
/>
66+
</a>
67+
<br/>
68+
<a href="https://github.dev/theseus-rs/postgresql-embedded">
69+
<img
70+
src="https://img.shields.io/static/v1?label=GitHub%20Codespaces&logo=github&message=Open&color=orange"
71+
alt="GitHub Codespaces"
72+
/>
73+
</a>
74+
6175
## Prior Art
6276
Projects that inspired this one:
6377
* [zonkyio/embedded-postgres-binaries](https://github.com/zonkyio/embedded-postgres-binaries)

0 commit comments

Comments
 (0)