シェルスクリプトからGoへの変更に伴い、開発コンテナの設定を変更

This commit is contained in:
2024-09-04 21:23:37 +09:00
parent 8d3b63440a
commit 524d9d4a6e
4 changed files with 35 additions and 4 deletions

View File

@@ -1,9 +1,9 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/alpine
{
"name": "Alpine",
"name": "KamishiroUPM",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/base:alpine-3.20",
"image": "mcr.microsoft.com/devcontainers/base:alpine",
// Features to add to the dev container. More info: https://containers.dev/features.
//"features": { }
@@ -12,10 +12,20 @@
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "uname -a",
"onCreateCommand": "sudo /bin/sh .devcontainer/initialize.sh",
// Configure tool-specific properties.
// "customizations": {},
"customizations": {
"vscode": {
"extensions": [
"foxundermoon.shell-format",
"GitLab.gitlab-workflow",
"golang.go",
"redhat.vscode-yaml",
"streetsidesoftware.code-spell-checker"
]
}
},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"

View File

@@ -0,0 +1,9 @@
apk add git git-lfs npm go
git config --global http.sslVerify false
git config --global advice.detachedHead false
go mod init KamishiroUPM
go get github.com/joho/godotenv
go get github.com/google/uuid
go mod tidy

8
go.mod Normal file
View File

@@ -0,0 +1,8 @@
module KamishiroUPM
go 1.22.6
require (
github.com/google/uuid v1.6.0
github.com/joho/godotenv v1.5.1
)

4
go.sum Normal file
View File

@@ -0,0 +1,4 @@
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=