Skip to content

qiuzhanghua/go-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Compile go use mod, Docker scratch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published