Skip to content

Commit

Permalink
fix devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
kamiazya authored Sep 25, 2021
1 parent f91efef commit 6476fe0
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 13 deletions.
17 changes: 15 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-16
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.192.0/containers/typescript-node/.devcontainer/base.Dockerfile

RUN apt-get update && apt-get install -y graphviz
# [Choice] Node.js version: 16, 14, 12
ARG VARIANT="16-buster"
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-${VARIANT}

# [Optional] Uncomment this section to install additional OS packages.
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends graphviz

# [Optional] Uncomment if you want to install an additional version of node using nvm
# ARG EXTRA_NODE_VERSION=10
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"

# [Optional] Uncomment if you want to install more global node packages
# RUN su node -c "npm install -g <your-package-list -here>"
36 changes: 26 additions & 10 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.192.0/containers/typescript-node
{
"name": "rediagram",
"dockerFile": "Dockerfile",
"postCreateCommand": "yarn insyall --frozen-lockfile",
"extensions": [
"EditorConfig.EditorConfig",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"Orta.vscode-jest"
],
"name": "rediagram",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick a Node version: 12, 14, 16
"args": {
"VARIANT": "16"
}
},
// Set *default* container specific settings.json values on container create.
"settings": {
"editor.formatOnSave": false,
"editor.formatOnPaste": false,
Expand All @@ -16,5 +18,19 @@
"source.fixAll.eslint": true
},
"typescript.tsdk": "node_modules/typescript/lib"
}
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"EditorConfig.EditorConfig",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"Orta.vscode-jest",
"folke.vscode-monorepo-workspace"
],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "yarn install",
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node"
}
2 changes: 1 addition & 1 deletion .github/workflows/generate-doc-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 16.x
- name: Install dependencies
run: yarn --frozen-lockfile --ignore-optional
env:
Expand Down

0 comments on commit 6476fe0

Please sign in to comment.