mirror of
https://github.com/asticode/go-astikit.git
synced 2025-12-24 11:50:53 +08:00
Added devcontainer
This commit is contained in:
32
.devcontainer/Dockerfile
Normal file
32
.devcontainer/Dockerfile
Normal 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"
|
||||
23
.devcontainer/devcontainer.json
Normal file
23
.devcontainer/devcontainer.json
Normal 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"
|
||||
}
|
||||
Reference in New Issue
Block a user