Skip to content

Commit 53e898b

Browse files
authored
Add Devcontainer (#123)
1 parent becb982 commit 53e898b

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed

.devcontainer/Dockerfile

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.234.0/containers/typescript-node/.devcontainer/base.Dockerfile
2+
3+
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18, 16, 14, 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster
4+
ARG VARIANT="18"
5+
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-${VARIANT}
6+
7+
# [Optional] Uncomment this section to install additional OS packages.
8+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
9+
# && apt-get -y install --no-install-recommends <your-package-list-here>
10+
11+
# [Optional] Uncomment if you want to install an additional version of node using nvm
12+
# ARG EXTRA_NODE_VERSION=10
13+
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"
14+
15+
# [Optional] Uncomment if you want to install more global node packages
16+
# RUN su node -c "npm install -g <your-package-list -here>"

.devcontainer/devcontainer.json

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.234.0/containers/typescript-node
3+
{
4+
"name": "Node.js & TypeScript",
5+
"build": {
6+
"dockerfile": "Dockerfile",
7+
"args": {
8+
"VARIANT": "18"
9+
}
10+
},
11+
"settings": {
12+
"files.insertFinalNewline": true,
13+
"files.trimTrailingWhitespace": true,
14+
"files.trimFinalNewlines": true,
15+
"files.eol": "\n",
16+
"[javascript]": {
17+
"editor.defaultFormatter": "esbenp.prettier-vscode"
18+
},
19+
"[typescriptreact]": {
20+
"editor.defaultFormatter": "esbenp.prettier-vscode"
21+
},
22+
"[typescript]": {
23+
"editor.defaultFormatter": "esbenp.prettier-vscode"
24+
},
25+
"editor.formatOnSave": true
26+
},
27+
"extensions": [
28+
"silvenon.mdx",
29+
"esbenp.prettier-vscode",
30+
"dbaeumer.vscode-eslint",
31+
"dbaeumer.vscode-eslint",
32+
"reduckted.vscode-gitweblinks",
33+
"christian-kohler.path-intellisense",
34+
"bradlc.vscode-tailwindcss"
35+
],
36+
"forwardPorts": [3000],
37+
"portsAttributes": {
38+
"3000": {
39+
"label": "interactionkit.dev"
40+
}
41+
},
42+
"postCreateCommand": "npm install",
43+
"features": {
44+
"git": "latest",
45+
"github-cli": "latest",
46+
"homebrew": "latest"
47+
}
48+
}

0 commit comments

Comments
 (0)