Skip to content

Commit c82de5d

Browse files
authored
Merge pull request #68 from xmtp-coder-agent/fix/issue-67
Add devcontainer configuration
2 parents 21fd207 + 3ed7ab5 commit c82de5d

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"name": "Go Dev Container",
3+
"build": {
4+
"context": "..",
5+
"dockerfile": "../dev/docker/devcontainer.Dockerfile"
6+
},
7+
"remoteEnv": {
8+
"LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}",
9+
"HOST_DOCKER_DEV_FOLDER": "${localWorkspaceFolder}/dev/docker"
10+
},
11+
"customizations": {
12+
"vscode": {
13+
"settings": {
14+
"go.gopath": "/go",
15+
"go.useLanguageServer": true
16+
},
17+
"extensions": [
18+
"golang.go",
19+
"ms-azuretools.vscode-docker"
20+
]
21+
}
22+
},
23+
"postCreateCommand": "go mod tidy",
24+
"forwardPorts": [],
25+
"remoteUser": "vscode",
26+
"features": {
27+
"ghcr.io/devcontainers/features/github-cli:1": {},
28+
"ghcr.io/devcontainers/features/common-utils:2": {
29+
"username": "vscode",
30+
"installZsh": true
31+
},
32+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
33+
"moby": false
34+
}
35+
}
36+
}

dev/docker/devcontainer.Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM golang:1.25
2+
3+
# Install golangci-lint
4+
RUN curl -sSfL https://golangci-lint.run/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.1.6
5+
6+
# Install buf CLI
7+
RUN go install github.com/bufbuild/buf/cmd/buf@latest
8+
9+
# Add shellcheck and jq
10+
RUN apt-get update && apt-get install -y \
11+
shellcheck \
12+
jq

0 commit comments

Comments
 (0)