updated playground

This commit is contained in:
Suyono 2024-08-29 22:54:07 +10:00
parent d8c2018ff8
commit 7e4b4f31c1
4 changed files with 26 additions and 10 deletions

View File

@ -1,11 +1,17 @@
name: dev-playground
services:
dev:
image: mcr.microsoft.com/devcontainers/go:1-1.22-bookworm
volumes:
- "..:/workspace"
deploy:
resources:
limits:
cpus: '0.5'
# deploy:
# resources:
# limits:
# cpus: '0.5'
command: sleep infinity
redis:
image: redis:7.2-alpine

View File

@ -7,11 +7,11 @@
"service": "dev",
"workspaceFolder": "/workspace",
// "image": "mcr.microsoft.com/devcontainers/go:1-1.22-bookworm",
"features": {
"ghcr.io/devcontainers/features/go:1": {},
"ghcr.io/guiyomh/features/golangci-lint:0": {},
"ghcr.io/brokeyourbike/devcontainer-features/staticcheck:0": {}
}
// "features": {
// "ghcr.io/devcontainers/features/go:1": {},
// "ghcr.io/guiyomh/features/golangci-lint:0": {},
// "ghcr.io/brokeyourbike/devcontainer-features/staticcheck:0": {}
// },
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
@ -26,5 +26,5 @@
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
"remoteUser": "root"
}

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module example
go 1.22.5

7
main.go Normal file
View File

@ -0,0 +1,7 @@
package main
import "fmt"
func main() {
fmt.Println("hello container")
}