Skip to content

Latest commit

 

History

History
44 lines (35 loc) · 626 Bytes

README.md

File metadata and controls

44 lines (35 loc) · 626 Bytes

go-docker

Go >=1.12 required

Docker installed

set env GOPROXY right

for China

GOPROXY=https://goproxy.io,direct

for other areas

GOPROXY=https://proxy.golang.org,direct

run locally

go run hello.go

output as "你好,世界。"

build locally

GOOS=linux GOARCH=amd64 go build

build docker image

docker build --build-arg goproxy=${GOPROXY} -t hello-go .

use docker run hello

docker run --rm hello-go

output as "Hello, world."

please notice

replace golang.org/x/text => github.com/golang/text v0.3.2

in go.mod