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

Add support for devcontainer #59

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
51 changes: 51 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"name": "Linux js2bin development container",
"image": "node:20.18.0-bullseye-slim",
"features": {
"ghcr.io/devcontainers/features/docker-from-docker:latest": {},
"ghcr.io/rocker-org/devcontainer-features/apt-packages:1": {
"packages": [
"curl",
"g++",
"git",
"make",
"nano",
"patch",
"python3",
"procps",
"wget"
]}
},
"runArgs": [
"--network=host"
],
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.cpptools",
"ms-vscode.cpptools-extension-pack",
"dbaeumer.vscode-eslint",
"eamodio.gitlens",
"esbenp.prettier-vscode",
"bierner.markdown-mermaid",
"spadin.memento-inputs",
"streetsidesoftware.code-spell-checker",
"timonwong.shellcheck"
]
}
},

"containerEnv": {
"LANG": "C.UTF-8",
"LC_ALL": "C.UTF-8"
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

"postCreateCommand": "bash ./.devcontainer/postCreateCommand.sh",

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
"workspaceMount": "source=${localWorkspaceFolder},target=${localWorkspaceFolder},type=bind",
"workspaceFolder": "${localWorkspaceFolder}"
}
6 changes: 6 additions & 0 deletions .devcontainer/postCreateCommand.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -ex

NVM_VERSION="v0.40.1"

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/${NVM_VERSION}/install.sh | bash