Skip to content

Commit

Permalink
bring back devcontainer feature for go
Browse files Browse the repository at this point in the history
dockerfile install is not faster
  • Loading branch information
hellt committed Nov 27, 2024
1 parent ad7c0ef commit a5b61b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
11 changes: 0 additions & 11 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,6 @@ RUN mkdir -p /root/.docker && echo "{}" > /root/.docker/config.json
# Maintain SSH_AUTH_SOCK env var when using sudo
RUN mkdir -p /etc/sudoers.d && echo 'Defaults env_keep += "SSH_AUTH_SOCK"' > /etc/sudoers.d/ssh_auth_sock

# Install Go 1.22
RUN bash -c 'ARCH=$(uname -m | sed "s/x86_64/amd64/" | sed "s/aarch64/arm64/") && \
curl -L https://go.dev/dl/go1.22.9.linux-${ARCH}.tar.gz | tar -C /usr/local -xzf - && \
/usr/local/go/bin/go install -v golang.org/x/tools/gopls@latest && \
/usr/local/go/bin/go install -v github.com/go-delve/delve/cmd/dlv@latest && \
/usr/local/go/bin/go install -v honnef.co/go/tools/cmd/staticcheck@latest && \
/usr/local/go/bin/go install -v github.com/cweill/gotests/gotests@latest && \
/usr/local/go/bin/go install -v github.com/fatih/gomodifytags@latest && \
/usr/local/go/bin/go install -v github.com/josharian/impl@latest && \
/usr/local/go/bin/go install -v github.com/haya14busa/goplay/cmd/goplay@latest'

# Switch to the vscode user provided by the base image
USER vscode

Expand Down
3 changes: 3 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
// Add sshd to support gh cli codespace cp.
"ghcr.io/devcontainers/features/sshd:1": {
"version": "latest"
},
"ghcr.io/devcontainers/features/go:1": {
"version": "1.22"
}
},
"remoteUser": "vscode",
Expand Down

0 comments on commit a5b61b8

Please sign in to comment.