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: services:
dev: dev:
image: mcr.microsoft.com/devcontainers/go:1-1.22-bookworm image: mcr.microsoft.com/devcontainers/go:1-1.22-bookworm
volumes: volumes:
- "..:/workspace" - "..:/workspace"
deploy: # deploy:
resources: # resources:
limits: # limits:
cpus: '0.5' # cpus: '0.5'
command: sleep infinity command: sleep infinity
redis:
image: redis:7.2-alpine

View File

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