|
| 1 | +// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at: |
| 2 | +// https://github.com/microsoft/vscode-dev-containers/tree/v0.195.0/containers/go |
| 3 | +{ |
| 4 | + "name": "wayback", |
| 5 | + "build": { |
| 6 | + "dockerfile": "Dockerfile", |
| 7 | + "args": { |
| 8 | + // Update the VARIANT arg to pick a version of Go: 1, 1.16, 1.17 |
| 9 | + // Append -bullseye or -buster to pin to an OS version. |
| 10 | + // Use -bullseye variants on local arm64/Apple Silicon. |
| 11 | + "VARIANT": "1-bullseye", |
| 12 | + // Options |
| 13 | + "NODE_VERSION": "lts/*" |
| 14 | + } |
| 15 | + }, |
| 16 | + "runArgs": [ |
| 17 | + "--cap-add=SYS_PTRACE", |
| 18 | + "--security-opt", |
| 19 | + "seccomp=unconfined" |
| 20 | + ], |
| 21 | + // Configure tool-specific properties. |
| 22 | + "customizations": { |
| 23 | + // Configure properties specific to VS Code. |
| 24 | + "vscode": { |
| 25 | + // Set *default* container specific settings.json values on container create. |
| 26 | + "settings": { |
| 27 | + "go.toolsManagement.checkForUpdates": "local", |
| 28 | + "go.useLanguageServer": true, |
| 29 | + "go.gopath": "/go", |
| 30 | + "go.goroot": "/usr/local/go", |
| 31 | + "go.toolsGopath": "/go/bin", |
| 32 | + "go.formatTool": "goimports", |
| 33 | + "go.lintOnSave": "package", |
| 34 | + "go.lintTool": "golangci-lint", |
| 35 | + "editor.formatOnSave": true |
| 36 | + }, |
| 37 | + // Add the IDs of extensions you want installed when the container is created. |
| 38 | + "extensions": [ |
| 39 | + "golang.Go" |
| 40 | + ] |
| 41 | + } |
| 42 | + }, |
| 43 | + // Use 'forwardPorts' to make a list of ports inside the container available locally. |
| 44 | + "forwardPorts": [ |
| 45 | + 8964 |
| 46 | + ], |
| 47 | + // Use 'portsAttributes' to set default properties for specific forwarded ports. More info: https://code.visualstudio.com/docs/remote/devcontainerjson-reference. |
| 48 | + "portsAttributes": { |
| 49 | + "8964": { |
| 50 | + "label": "Application port", |
| 51 | + "onAutoForward": "notify" |
| 52 | + } |
| 53 | + }, |
| 54 | + // Use 'otherPortsAttributes' to configure any ports that aren't configured using 'portsAttributes'. |
| 55 | + // "otherPortsAttributes": { |
| 56 | + // "onAutoForward": "silent" |
| 57 | + // }, |
| 58 | + // Use 'postCreateCommand' to run commands after the container is created. |
| 59 | + // "postCreateCommand": "go version", |
| 60 | + // Uncomment to connect as a non-root user. More info: https://aka.ms/vscode-remote/containers/non-root. |
| 61 | + "remoteUser": "vscode", |
| 62 | + "remoteEnv": { |
| 63 | + "DEBUG": true, |
| 64 | + "LOG_TIME": true, |
| 65 | + "HTTP_LISTEN_ADDR": "0.0.0.0:8964", |
| 66 | + "WAYBACK_STORAGE_DIR": "/tmp/reduxer" |
| 67 | + } |
| 68 | +} |
0 commit comments