Skip to content

Commit

Permalink
NEW add devcontainer (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
HappyTobi authored Jan 15, 2024
1 parent 69a7fc3 commit 67c14c1
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
ARG GO_VERSION=1.21
ARG ALPINE_VERSION=3.18

FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION}

# Install packages and Go language server
RUN apk add -q --update --progress --no-cache git sudo openssh-client bash make
RUN go install golang.org/x/tools/gopls@latest 2>&1 && \
go install github.com/cweill/gotests/gotests@latest 2>&1 && \
go install github.com/fatih/gomodifytags@latest 2>&1 && \
go install github.com/josharian/impl@latest 2>&1 && \
go install github.com/haya14busa/goplay/cmd/goplay@latest 2>&1 && \
go install github.com/go-delve/delve/cmd/dlv@latest 2>&1 && \
go install honnef.co/go/tools/cmd/staticcheck@latest 2>&1

# Install additional tools
RUN go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest 2>&1
15 changes: 15 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"dockerFile": "Dockerfile",
"customizations": {
"vscode": {
"extensions": [
"golang.go",
"ms-azuretools.vscode-docker",
"ms-vscode.makefile-tools"
],
"settings": {
"go.useLanguageServer": true
}
}
}
}

0 comments on commit 67c14c1

Please sign in to comment.