Added devcontainer

This commit is contained in:
Quentin Renard
2025-10-27 13:30:22 +00:00
parent a96d869708
commit f9600a19ce
2 changed files with 55 additions and 0 deletions

32
.devcontainer/Dockerfile Normal file
View File

@@ -0,0 +1,32 @@
FROM alpine:latest
RUN apk add --update
##
# git
##
RUN apk add git openssh-client nano less
##
# c
##
RUN apk add build-base
##
# go
##
ARG GO_VERSION
RUN <<_EOF_ sh
arch=$(apk --print-arch)
goArch="amd64"
case \${arch} in
aarch64) goArch="arm64" ;;
esac
wget -O /tmp/go.tar.gz https://dl.google.com/go/go${GO_VERSION}.linux-\${goArch}.tar.gz
tar -C /opt -xzf /tmp/go.tar.gz
_EOF_
ENV PATH="$PATH:/opt/go/bin"

View File

@@ -0,0 +1,23 @@
{
"build": {
"args": {
"GO_VERSION": "1.25.3"
},
"dockerfile": "Dockerfile"
},
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.cpptools-extension-pack",
"golang.go"
],
"settings": {
"remote.autoForwardPorts": false
}
}
},
"mounts": [
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.ssh,target=/root/.ssh,readonly,type=bind"
],
"name": "asticode/go-astikit"
}