Skip to content

Commit ddfe814

Browse files
committed
Add devcontainer for Linux
1 parent f3b3883 commit ddfe814

2 files changed

Lines changed: 57 additions & 0 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"name": "Linux js2bin development container",
3+
"image": "node:20.18.0-bullseye-slim",
4+
"features": {
5+
"ghcr.io/devcontainers/features/docker-from-docker:latest": {},
6+
"ghcr.io/rocker-org/devcontainer-features/apt-packages:1": {
7+
"packages": [
8+
"curl",
9+
"g++",
10+
"git",
11+
"make",
12+
"nano",
13+
"patch",
14+
"python3",
15+
"procps",
16+
"wget"
17+
]}
18+
},
19+
"runArgs": [
20+
"--network=host"
21+
],
22+
"customizations": {
23+
"vscode": {
24+
"extensions": [
25+
"ms-vscode.cpptools",
26+
"ms-vscode.cpptools-extension-pack",
27+
"dbaeumer.vscode-eslint",
28+
"eamodio.gitlens",
29+
"esbenp.prettier-vscode",
30+
"bierner.markdown-mermaid",
31+
"spadin.memento-inputs",
32+
"streetsidesoftware.code-spell-checker",
33+
"timonwong.shellcheck"
34+
]
35+
}
36+
},
37+
38+
"containerEnv": {
39+
"LANG": "C.UTF-8",
40+
"LC_ALL": "C.UTF-8"
41+
},
42+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
43+
// "forwardPorts": [],
44+
45+
"postCreateCommand": "bash ./.devcontainer/postCreateCommand.sh",
46+
47+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
48+
// "remoteUser": "root"
49+
"workspaceMount": "source=${localWorkspaceFolder},target=${localWorkspaceFolder},type=bind",
50+
"workspaceFolder": "${localWorkspaceFolder}"
51+
}

.devcontainer/postCreateCommand.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
set -ex
3+
4+
NVM_VERSION="v0.40.1"
5+
6+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/${NVM_VERSION}/install.sh | bash

0 commit comments

Comments
 (0)