Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

devcontainer.json: Irshad Gopang #139

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
163 changes: 61 additions & 102 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,103 +1,62 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
{
"name": "Debian",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "docker.io/layerzerolabs/devcon:1.0.9",

"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": "true",
"configureZshAsDefaultShell": "true",
"installOhMyZsh": "true",
// username should be root and installOhMyZshConfig should be false to avoid overwriting .zshrc in the base image
"username": "root",
"installOhMyZshConfig": "false"
},
"ghcr.io/devcontainers/features/docker-in-docker:2": {
// Docker Compose v2 is required for or compatible with the repository
"dockerDashComposeVersion": "v2",
// https://github.com/devcontainers/features/issues/573#issuecomment-1593854983
"moby": false
}
},

// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
// Theme
"PKief.material-icon-theme",
// git
"GitHub.remotehub",
"GitHub.copilot",
"GitHub.vscode-pull-request-github",
"eamodio.gitlens",
"vivaxy.vscode-conventional-commits",
// Editor
"oderwat.indent-rainbow",
"iliazeus.vscode-ansi",
"editorconfig.editorconfig",
// Spell checker
"streetsidesoftware.code-spell-checker",
// Zip
"arcanis.vscode-zipfs",
// PDF viewer
"tomoki1207.pdf",
// YAML
"redhat.vscode-yaml",
// Docker
"ms-azuretools.vscode-docker",
// Javascript and Typescript
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
// Solidity
"NomicFoundation.hardhat-solidity",
// Rust
"rust-lang.rust-analyzer",
// Move
"damirka.move-syntax",
"hashicorp.terraform",
// Live share
"ms-vsliveshare.vsliveshare",
// Mermaid
"bierner.markdown-mermaid"
],
"settings": {
"remote.autoForwardPorts": false,
"terminal.integrated.defaultProfile.linux": "zsh",
"terminal.integrated.profiles.linux": {
"bash": {
"path": "/usr/bash"
},
"zsh": {
"path": "/usr/bin/zsh"
}
}
}
}
},

"initializeCommand": {
"mkdir-aws": "mkdir -p ${localEnv:HOME}/.aws",
"touch-zsh-history": "touch ${localEnv:HOME}/.zsh_history"
},

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "PLUGIN_PATH=~/.oh-my-zsh/custom/plugins/zsh-autosuggestions; if [ ! -d $PLUGIN_PATH ]; then git clone https://github.com/zsh-users/zsh-autosuggestions $PLUGIN_PATH; fi && sed -i'' -e 's/^plugins.*)/plugins=(git zsh-autosuggestions)/' ~/.zshrc",

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
"remoteUser": "root",

"remoteEnv": {
"NPM_TOKEN": "${localEnv:NPM_TOKEN}",
"GH_TOKEN": "${localEnv:GH_TOKEN}",
"GITHUB_TOKEN": "${localEnv:GITHUB_TOKEN}"
},

"mounts": [
"source=${localEnv:HOME}/.aws,target=/root/.aws,type=bind",
"source=${localEnv:HOME}/.zsh_history,target=/root/.zsh_history,type=bind"
]
}

"name": "Debian",
"image": "docker.io/layerzerolabs/devcon:1.0.9",
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": "true",
"configureZshAsDefaultShell": "true",
"installOhMyZsh": "true",
"username": "root",
"installOhMyZshConfig": "false"
},
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"dockerDashComposeVersion": "v2",
"moby": false
}
},
"customizations": {
"vscode": {
"extensions": [
"PKief.material-icon-theme",
"GitHub.remotehub",
"GitHub.copilot",
"eamodio.gitlens",
"vivaxy.vscode-conventional-commits",
"oderwat.indent-rainbow",
"iliazeus.vscode-ansi",
"editorconfig.editorconfig",
"streetsidesoftware.code-spell-checker",
"redhat.vscode-yaml",
"ms-azuretools.vscode-docker",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"rust-lang.rust-analyzer",
"bierner.markdown-mermaid"
],
"settings": {
"remote.autoForwardPorts": false,
"terminal.integrated.defaultProfile.linux": "zsh",
"terminal.integrated.profiles.linux": {
"bash": {
"path": "/bin/bash"
},
"zsh": {
"path": "/usr/bin/zsh"
}
}
}
}
},
"initializeCommand": "mkdir -p ${localEnv:HOME}/.aws && touch ${localEnv:HOME}/.zsh_history",
"postCreateCommand": "PLUGIN_PATH=~/.oh-my-zsh/custom/plugins/zsh-autosuggestions; if [ ! -d $PLUGIN_PATH ]; then git clone https://github.com/zsh-users/zsh-autosuggestions $PLUGIN_PATH; fi && grep -q 'plugins=(git zsh-autosuggestions)' ~/.zshrc || sed -i'' -e 's/^plugins.*)/plugins=(git zsh-autosuggestions)/' ~/.zshrc",
"remoteUser": "root",
"remoteEnv": {
"NPM_TOKEN": "${localEnv:NPM_TOKEN}",
"GH_TOKEN": "${localEnv:GH_TOKEN}",
"GITHUB_TOKEN": "${localEnv:GITHUB_TOKEN}"
},
"mounts": [
"source=${localEnv:HOME}/.aws,target=/root/.aws,type=bind",
"source=${localEnv:HOME}/.zsh_history,target=/root/.zsh_history,type=bind"
]
}