mirror of
https://github.com/edu4rdshl/rust-postgres-devcontainer.git
synced 2026-07-17 23:24:56 +00:00
(breaking-change): this image will only work on podman now
Some adjustments to the mounts and launch options were made and now only works with podman
This commit is contained in:
parent
3fd4ac0ca5
commit
9e9826027b
2 changed files with 14 additions and 18 deletions
|
|
@ -1,10 +1,11 @@
|
|||
// 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_devcontainer",
|
||||
"name": "rust_personal-devcontainer",
|
||||
"build": {
|
||||
"dockerfile": "Dockerfile"
|
||||
},
|
||||
|
|
@ -28,26 +29,25 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
"workspaceFolder": "/home/vscode/workspace",
|
||||
"workspaceMount": "source=/var/local/development,target=/home/vscode/workspace,type=bind,consistency=cached",
|
||||
"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_devcontainer",
|
||||
"target": "/usr/local/cargo",
|
||||
"source": "cargo-cache-rust-personal_devcontainer",
|
||||
"target": "/usr/local/cargo:U",
|
||||
"type": "volume"
|
||||
},
|
||||
// Handle the postgres data directory
|
||||
{
|
||||
"source": "postgres-rust_devcontainer",
|
||||
"target": "/var/lib/postgresql/15/main",
|
||||
"source": "postgres-rust-personal_devcontainer",
|
||||
"target": "/var/lib/postgresql/15/main:U",
|
||||
"type": "volume"
|
||||
}
|
||||
],
|
||||
"runArgs": [
|
||||
"--restart=always",
|
||||
"--name=rust_devcontainer"
|
||||
"--name=rust_personal-devcontainer"
|
||||
],
|
||||
"postStartCommand": "sudo service postgresql start",
|
||||
"remoteUser": "vscode"
|
||||
"postStartCommand": "service postgresql start"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue