/go-docker

A basic Go development environment using Docker

Primary LanguageDockerfile

Build Go application container image:
$ docker build -t my-go-image .

Run Go application on host port 8080:
$ docker run -it -p 8080:8080 my-go-image

Init a module to get mod.go & sum.go files:
$ go mod init github.com/astpierre/<mod-name>


Resources: here and here