Skip to content

Commit 2af3d4a

Browse files
committed
Added devcontainer
1 parent 7c2bf6b commit 2af3d4a

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed

.devcontainer/Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM alpine:latest
2+
3+
RUN apk add --update
4+
5+
##
6+
# git
7+
##
8+
9+
RUN apk add git openssh-client
10+
11+
##
12+
# go
13+
##
14+
15+
ADD https://dl.google.com/go/go1.25.3.linux-amd64.tar.gz /tmp/go.tar.gz
16+
RUN tar -C /opt -xzf /tmp/go.tar.gz
17+
ENV PATH="$PATH:/opt/go/bin"

.devcontainer/devcontainer.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"build": {
3+
"dockerfile": "Dockerfile"
4+
},
5+
"containerEnv": {
6+
"GOCACHE": "${containerWorkspaceFolder}/.devcontainer/tmp/gocache",
7+
"GOMODCACHE": "${containerWorkspaceFolder}/.devcontainer/tmp/gomodcache"
8+
},
9+
"customizations": {
10+
"vscode": {
11+
"extensions": ["golang.go"],
12+
"settings": {
13+
"remote.autoForwardPorts": false
14+
}
15+
}
16+
},
17+
"forwardPorts": [],
18+
"mounts": [
19+
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.ssh,target=/root/.ssh,readonly,type=bind"
20+
],
21+
"name": "asticode/go-astits"
22+
}

.devcontainer/tmp/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

0 commit comments

Comments
 (0)