mirror of
https://github.com/edu4rdshl/rust-postgres-devcontainer.git
synced 2026-07-18 07:34:49 +00:00
Some adjustments to the mounts and launch options were made and now only works with podman
53 lines
No EOL
1.9 KiB
JSON
53 lines
No EOL
1.9 KiB
JSON
// This is intended to run **ONLY** on Podman
|
|
// This is the devcontainer.json file for the Rust development container
|
|
// It's intended to be used for many different projects, so it's a bit more generic.
|
|
// All you need is to create a symlink to /var/local/development from the directory
|
|
// where you have all your Rust projects. You can however override the options,
|
|
// check the README.md for more information.
|
|
{
|
|
"name": "rust_personal-devcontainer",
|
|
"build": {
|
|
"dockerfile": "Dockerfile"
|
|
},
|
|
"customizations": {
|
|
"vscode": {
|
|
"settings": {
|
|
"terminal.integrated.shell.linux": "/bin/bash"
|
|
},
|
|
"extensions": [
|
|
"rust-lang.rust-analyzer",
|
|
"ms-vscode.cpptools",
|
|
"vadimcn.vscode-lldb",
|
|
"ms-vscode.cmake-tools",
|
|
"twxs.cmake",
|
|
"fill-labs.dependi",
|
|
"tamasfe.even-better-toml",
|
|
"GitLab.gitlab-workflow",
|
|
"ms-ossdata.vscode-postgresql",
|
|
"mtxr.sqltools",
|
|
"mtxr.sqltools-driver-pg"
|
|
]
|
|
}
|
|
},
|
|
"workspaceFolder": "/workspace",
|
|
"workspaceMount": "source=/var/local/personal-development,target=/workspace,type=bind,consistency=cached",
|
|
// Handle CARGO_HOME=/usr/local/cargo creating a volume for the cargo data to persist between runs
|
|
"mounts": [
|
|
{
|
|
"source": "cargo-cache-rust-personal_devcontainer",
|
|
"target": "/usr/local/cargo:U",
|
|
"type": "volume"
|
|
},
|
|
// Handle the postgres data directory
|
|
{
|
|
"source": "postgres-rust-personal_devcontainer",
|
|
"target": "/var/lib/postgresql/15/main:U",
|
|
"type": "volume"
|
|
}
|
|
],
|
|
"runArgs": [
|
|
"--restart=always",
|
|
"--name=rust_personal-devcontainer"
|
|
],
|
|
"postStartCommand": "service postgresql start"
|
|
} |