Skip to content
This repository has been archived by the owner on Jun 27, 2022. It is now read-only.

Latest commit

 

History

History
26 lines (18 loc) · 1.12 KB

README.md

File metadata and controls

26 lines (18 loc) · 1.12 KB

go-docker-example

Build Status Coverage Status

A small example of building and running a Go app inside of a Docker container.

  • Uses Go Modules
  • Runs go test during build
  • Uses Docker's multi-stage builds
  • Builds and runs (as an example) on Travis CI
  • Uses Coveralls for test coverage history

Running Locally

Be sure to have Go 1.12+ installed and try running:

$ go run cmd/example/main.go

Coveralls

When running builds under your own Travis CI account (or any CI service), the travis.sh file requires the COVERALLS_TOKEN variable to be set to your Coveralls repo token. In Travis CI, you can set this variable in your project's settings under the Environment Variables section. If you do not want to use Coveralls, you may safely remove lines 10-12 in Dockerfile and line 7 in travis.sh.