build/dev: Add VSCode Devcontainer support (#1000)

* Adding Devcontainer support

* Update .devcontainer/devcontainer.json

Awesome. I had to manually install the extension. Adding this would be perfect

Co-authored-by: Scott <gloriousCode@users.noreply.github.com>

* Update docker-compose.yml

Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
This commit is contained in:
Varun Bhat
2022-07-31 23:44:56 -07:00
committed by GitHub
parent 98feed247f
commit c2a489a9b1
3 changed files with 98 additions and 0 deletions

17
.devcontainer/Dockerfile Normal file
View File

@@ -0,0 +1,17 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.195.0/containers/go/.devcontainer/base.Dockerfile
# [Choice] Go version (use -bullseye variants on local arm64/Apple Silicon): 1, 1.16, 1.17, 1-bullseye, 1.16-bullseye, 1.17-bullseye, 1-buster, 1.16-buster, 1.17-buster
ARG VARIANT=1-bullseye
FROM mcr.microsoft.com/vscode/devcontainers/go:0-${VARIANT}
# [Choice] Node.js version: lts/*, 16, 14, 12, 10
ARG NODE_VERSION="lts/*"
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c ". /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
# RUN mv -vn config_example.json config.json
WORKDIR /workspace
# RUN cp . /workspace/
# RUN CWD
# RUN GO111MODULE=on go mod vendor
# RUN go build .
# RUN go build ./cmd/gctcli