Skip to content

Instantly share code, notes, and snippets.

@storopoli
Last active September 11, 2024 19:30
Show Gist options
  • Save storopoli/a3564f117fcc958eab6ce6a567e271e0 to your computer and use it in GitHub Desktop.
Save storopoli/a3564f117fcc958eab6ce6a567e271e0 to your computer and use it in GitHub Desktop.
Devcontainers Configs
{
"name": "Alpine",
"image": "mcr.microsoft.com/devcontainers/base:alpine",
"postCreateCommand": "sudo apk update && sudo apk add <PKGS>"
}
{
"name": "Dioxus",
"image": "mcr.microsoft.com/devcontainers/base:debian",
"features": {
"ghcr.io/devcontainers/features/rust:1": {},
"ghcr.io/lee-orr/rusty-dev-containers/wasm32-unknown-unknown:0": {},
"ghcr.io/lee-orr/rusty-dev-containers/dioxus:0": {}
},
"mounts": [
{
//"source": "devcontainer-cargo-cache-${devcontainerId}", // for each container
"source": "devcontainer-cargo-cache", // for all containers
"target": "/usr/local/cargo",
"type": "volume"
}
],
"forwardPorts": [
8080
],
"customizations": {
"vscode": {
"extensions": [
"rust-lang.rust-analyzer",
"tamasfe.even-better-toml",
"fill-labs.dependi",
"vadimcn.vscode-lldb",
"DioxusLabs.dioxus"
]
}
}
}
{
"name": "gh-cli",
"image": "mcr.microsoft.com/devcontainers/base:debian",
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {}
},
"remoteUser": "vscode",
"mounts": [
{
"source": "${localEnv:HOME}${localEnv:USERPROFILE}/.config/gh",
"target": "/home/vscode/.config/gh",
"type": "bind"
}
]
}
{
"name": "Hugo",
"image": "mcr.microsoft.com/devcontainers/base:debian",
"forwardPorts": [1313],
"customizations": {
"vscode": {
"settings": {
"html.format.templating": true
},
"extensions": [
"redhat.vscode-yaml",
"tamasfe.even-better-toml",
"davidanson.vscode-markdownlint"
]
}
},
"postCreateCommand": "git submodule update --init --recursive"
}
{
"name": "Julia",
"image": "mcr.microsoft.com/devcontainers/base:debian",
"features": {
"ghcr.io/julialang/devcontainer-features/julia:1": {}
},
"customizations": {
"vscode": {
"extensions": [
"julialang.language-julia",
"tamasfe.even-better-toml"
]
}
}
}
{
"name": "Lazygit",
"image": "mcr.microsoft.com/devcontainers/base:debian",
"features": {
/*
"ghcr.io/devcontainers/features/go:1": {},
"ghcr.io/azutake/devcontainer-features/go-packages-install:0": {
"PACKAGES": "github.com/jesseduffield/lazygit@latest"
}
*/
"ghcr.io/GeorgOfenbeck/features/lazygit-linuxbinary:1": {}
},
"mounts": [
{
"source": "${localEnv:HOME}${localEnv:USERPROFILE}/.config/lazygit",
"target": "/home/vscode/.config/lazygit",
"type": "bind"
}
]
}
{
"name": "Nix",
"image": "mcr.microsoft.com/devcontainers/base:debian",
"postCreateCommand": "curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install linux --init none --no-confirm --extra-conf 'sandbox = false'"
// Running as root because of the init none in nix installer
"remoteUser": "root",
"customizations": {
"vscode": {
"extensions": [
"jnoortheen.nix-ide"
]
}
}
}
{
"name": "Nix",
"image": "mcr.microsoft.com/devcontainers/base:debian",
"features": {
"ghcr.io/devcontainers/features/nix:1": {
"version": "latest",
"extraNixConfig": "experimental-features = nix-command flakes"
},
"customizations": {
"vscode": {
"extensions": [
"jnoortheen.nix-ide"
]
}
}
}
{
"name": "Neovim",
"image": "mcr.microsoft.com/devcontainers/base:debian",
"features": {
"ghcr.io/devcontainers-contrib/features/apt-get-packages:1": {
"packages": "fd-find,ripgrep,nodejs"
},
"ghcr.io/devcontainers-contrib/features/neovim-homebrew:1": {
},
"mounts": [
{
"source": "${localEnv:HOME}${localEnv:USERPROFILE}/.config/nvim",
"target": "/home/vscode/.config/nvim",
"type": "bind"
}
]
}
{
"name": "Remote Container",
"image": "mcr.microsoft.com/devcontainers/base:debian",
"remoteUser": "vscode",
"workspaceMount": "source=/home/<user>/<path>,target=/workspace,type=bind,consistency=cached",
"workspaceFolder": "/workspace"
}
{
"name": "Rust",
"image": "mcr.microsoft.com/devcontainers/rust",
"mounts": [
{
//"source": "devcontainer-cargo-cache-${devcontainerId}", // for each container
"source": "devcontainer-cargo-cache", // for all containers
"target": "/usr/local/cargo",
"type": "volume"
}
],
"customizations": {
"vscode": {
"extensions": [
"rust-lang.rust-analyzer",
"tamasfe.even-better-toml",
"fill-labs.dependi",
"vadimcn.vscode-lldb",
]
}
}
}
{
"name": "Typst",
"image": "mcr.microsoft.com/devcontainers/base:debian",
"features": {
"ghcr.io/michidk/devcontainers-features/typst:0": {}
},
"customizations": {
"vscode": {
"extensions": [
"nvarner.typst-lsp",
"mgt19937.typst-preview",
"tomoki1207.pdf"
]
}
}
}
{
"name": "Zig",
"image": "mcr.microsoft.com/devcontainers/base:debian",
"features": {
"ghcr.io/devcontainers-contrib/features/zig:1": {}
},
"customizations": {
"vscode": {
"extensions": [
"ziglang.vscode-zig"
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment