Golang Docker Sample is an example on how to test, build and publish a go app on Github.
This repository produces a Docker image on Dockerhub:
# Start docker image
docker run nmetz/golang-docker-sample:latest
To build only sample app on your local machine it's required to have Golang Language installed. To install Golang please follow this instructions here.
# Clone git repository
git clone https://github.com/NickMetz/golang-docker-sample
# Run go Build
go build cmd/golang-docker-sample/main.go
The following environment variables configure the Golang Docker Sample:
| Name | Description | Default |
|---|---|---|
PARALLEL_JOBS |
Define how many jobs should run in parallel. | 5 |
LIMIT_JOBS |
Limit how many jobs should be executed in total. Default to 0 for infinity job execution. |
0 |