added example
This commit is contained in:
8
.devcontainer/Dockerfile
Normal file
8
.devcontainer/Dockerfile
Normal file
@@ -0,0 +1,8 @@
|
||||
FROM rust:1-bookworm
|
||||
RUN apt update && apt upgrade -y && apt install fish iputils-ping -y
|
||||
|
||||
RUN useradd -ms /bin/fish vscode
|
||||
USER vscode
|
||||
RUN rustup target add wasm32-unknown-unknown
|
||||
RUN rustup component add rustfmt clippy
|
||||
RUN cargo install cargo-leptos
|
||||
55
.devcontainer/devcontainer.json
Normal file
55
.devcontainer/devcontainer.json
Normal file
@@ -0,0 +1,55 @@
|
||||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
||||
// README at: https://github.com/devcontainers/templates/tree/main/src/rust
|
||||
{
|
||||
"name": "Rust",
|
||||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
||||
"dockerComposeFile": "docker-compose.yml",
|
||||
"service": "app",
|
||||
"workspaceFolder": "/workspace",
|
||||
|
||||
// Use 'mounts' to make the cargo cache persistent in a Docker Volume.
|
||||
// "mounts": [
|
||||
// {
|
||||
// "source": "devcontainer-cargo-cache-${devcontainerId}",
|
||||
// "target": "/usr/local/cargo",
|
||||
// "type": "volume"
|
||||
// }
|
||||
// ]
|
||||
|
||||
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||
// "features": {
|
||||
// "ghcr.io/meaningful-ooo/devcontainer-features/fish:1": {}
|
||||
// },
|
||||
"mounts": [
|
||||
"source=/home/tobi/.ssh,target=/home/vscode/.ssh,type=bind"
|
||||
],
|
||||
|
||||
|
||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||
// "forwardPorts": [],
|
||||
|
||||
// Use 'postCreateCommand' to run commands after the container is created.
|
||||
//"postCreateCommand": "git clone https://gitea.maiertobi.de/tobimai/dotfiles.git /home/vscode/dotfiles && cargo install cargo-tarpaulin",
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"serayuzgur.crates",
|
||||
"tamasfe.even-better-toml",
|
||||
"vadimcn.vscode-lldb",
|
||||
"mutantdino.resourcemonitor",
|
||||
"rust-lang.rust-analyzer",
|
||||
"ms-azuretools.vscode-docker"
|
||||
],
|
||||
"settings": {
|
||||
"terminal.integrated.defaultProfile.linux": "Fish",
|
||||
"terminal.integrated.profiles.linux": {
|
||||
"Fish": {
|
||||
"path": "fish"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
||||
"remoteUser": "vscode"
|
||||
}
|
||||
9
.devcontainer/docker-compose.yml
Normal file
9
.devcontainer/docker-compose.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
version: '3'
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: .devcontainer/Dockerfile
|
||||
volumes:
|
||||
- ..:/workspace:cached
|
||||
command: sleep infinity
|
||||
Reference in New Issue
Block a user