diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..cd8e346 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,20 @@ +# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.194.3/containers/go/.devcontainer/base.Dockerfile + +# [Choice] Go version: 1, 1.16, 1.17 +ARG VARIANT="1.17" +FROM mcr.microsoft.com/vscode/devcontainers/go:0-${VARIANT} + +# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10 +ARG NODE_VERSION="none" +RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi + +# [Optional] Uncomment this section to install additional OS packages. +# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ +# && apt-get -y install --no-install-recommends +RUN apt-get update && apt-get install -y --no-install-recommends libzmq3-dev libzmq5 + +# [Optional] Uncomment the next line to use go get to install anything else you need +# RUN go get -x + +# [Optional] Uncomment this line to install global node packages. +# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g " 2>&1 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index b36335d..9ab51d0 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,42 +1,18 @@ { "name": "GitHub Codespaces (Default)", + "extensions": [ + "GitHub.vscode-pull-request-github", + "golang.go", + "hashicorp.terraform", + "wholroyd.hcl", + "github.copilot", + "golang.Go" + ], "build": { - "dockerfile": "docker/Dockerfile" - }, - "settings": { - "go.toolsManagement.checkForUpdates": "local", - "go.useLanguageServer": true, - "go.gopath": "/go", - "go.goroot": "/usr/local/go/bin/go", - "go.linting.enabled": true, - "lldb.executable": "/usr/bin/lldb", - "files.watcherExclude": { - "**/target/**": true + "dockerfile": "Dockerfile", + "args": { + "VARIANT": "1.17", + "NODE_VERSION": "none" } }, - "remoteUser": "codespace", - "overrideCommand": false, - "mounts": ["source=codespaces-linux-var-lib-docker,target=/var/lib/docker,type=volume"], - "runArgs": [ - "--cap-add=SYS_PTRACE", - "--security-opt", - "seccomp=unconfined", - "--privileged", - "--init" - ], - - // Add the IDs of extensions you want installed when the container is created. - "extensions": [ - "GitHub.vscode-pull-request-github", - "golang.go", - "hashicorp.terraform", - "wholroyd.hcl", - "github.copilot" - ], - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - - // "oryx build" will automatically install your dependencies and attempt to build your project - // "postCreateCommand": "oryx build -p virtualenv_name=.venv --log-file /tmp/oryx-build.log --manifest-dir /tmp || echo 'Could not auto-build. Skipping.'" } diff --git a/.devcontainer/docker/Dockerfile b/.devcontainer/docker/Dockerfile deleted file mode 100644 index 811494d..0000000 --- a/.devcontainer/docker/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -FROM dragonheim/golang:1.17.1