Skip to content

Instantly share code, notes, and snippets.

@tobiasdalhof
Created January 5, 2021 07:35
Show Gist options
  • Save tobiasdalhof/c331c03c81b6853526860a939e01a2ab to your computer and use it in GitHub Desktop.
Save tobiasdalhof/c331c03c81b6853526860a939e01a2ab to your computer and use it in GitHub Desktop.
vscode go devcontainer example
{
"name": "Go",
"build": {
"dockerfile": "./Dockerfile",
"context": "./",
"target": "dev"
},
"forwardPorts": [3000],
"settings": {
"terminal.integrated.shell.linux": "/bin/sh",
"go.gopath": "/go",
"go.useLanguageServer": true,
"gopls": {
"usePlaceholders": true
},
"files.eol": "\n"
},
"extensions": [
"golang.Go",
"2gua.rainbow-brackets",
"oderwat.indent-rainbow"
]
}
FROM golang:1.15-alpine as dev
RUN apk add --no-cache git
WORKDIR /work
RUN go get github.com/uudashr/gopkgs/cmd/gopkgs \
github.com/ramya-rao-a/go-outline \
github.com/go-delve/delve/cmd/dlv \
golang.org/x/lint/golint
RUN GO111MODULE=on go get golang.org/x/tools/gopls@master golang.org/x/tools@master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment