Skip to content
This repository was archived by the owner on Sep 9, 2022. It is now read-only.

Commit 3e89897

Browse files
committed
upgrade secman vscode devcontainer
1 parent 2a2fefb commit 3e89897

File tree

2 files changed

+28
-12
lines changed

2 files changed

+28
-12
lines changed

.devcontainer/Dockerfile

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
ARG VARIANT=16-bullseye
2-
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}
1+
ARG VARIANT=1.17
2+
ARG NODE_VERSION="16"
33

4-
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive
4+
FROM mcr.microsoft.com/vscode/devcontainers/go:0-${VARIANT}
5+
6+
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive && apt-get install software-properties-common curl
7+
8+
# Install Node.js
9+
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
510

611
# Install Secman
7-
RUN su node -c "npm install -g secman"
12+
RUN su userx -c "curl -sL https://u.secman.dev | bash"
813

914
# Initialize `~/.secman`
1015
RUN secman init

.devcontainer/devcontainer.json

+19-8
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,39 @@
11
{
2-
"name": "Node.js",
2+
"name": "Go",
33
"build": {
4-
"dockerfile": "Dockerfile",
5-
"args": { "VARIANT": "16-bullseye" }
6-
},
4+
"dockerfile": "Dockerfile",
5+
"args": {
6+
"VARIANT": "1.17",
7+
"NODE_VERSION": "16"
8+
}
9+
},
10+
"runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
711
"settings": {
812
"search.exclude": {
913
"node_modules/**": true
1014
},
15+
"go.toolsManagement.checkForUpdates": "local",
16+
"go.useLanguageServer": true,
17+
"go.gopath": "/go",
18+
"go.goroot": "/usr/local/go",
1119
"editor.formatOnSave": true,
1220
"editor.fontLigatures": true,
1321
"git.autofetch": true,
1422
"git.confirmSync": false,
1523
"editor.defaultFormatter": "esbenp.prettier-vscode",
16-
"javascript.updateImportsOnFileMove.enabled": "always"
24+
"javascript.updateImportsOnFileMove.enabled": "always",
25+
"compile-hero.disable-compile-files-on-did-save-code": true
1726
},
1827
"extensions": [
1928
"ms-vscode.js-debug",
2029
"ms-azuretools.vscode-docker",
2130
"esbenp.prettier-vscode",
2231
"PKief.material-icon-theme",
2332
"aaron-bond.better-comments",
24-
"dsznajder.es7-react-js-snippets"
33+
"dsznajder.es7-react-js-snippets",
34+
"golang.go",
35+
"bbenoist.Nix"
2536
],
26-
"postCreateCommand": "yarn install",
27-
"remoteUser": "node"
37+
"postCreateCommand": "go mod tidy && cd core && yarn",
38+
"remoteUser": "userx"
2839
}

0 commit comments

Comments
 (0)