Docker based skeleton for standard Go application
Makefile Go Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
build
cmd/app
pkg/shared
.gitignore
Dockerfile
LICENSE.md
Makefile
README.md

README.md

Chat at https://gitter.im/plutov/go-docker-skeleton

Go skeleton build environment

This Docker based build environment can be used to start all your Go apps. I am personally use it to save my time with init steps.

Build

  • make - compiles the app. This will use a Docker image to build your app, with the current directory volume-mounted into place. This will store incremental state for the fastest possible build.
  • make container - builds the container image. It will calculate the image tag based on the most recent git tag, and whether the repo is "dirty" since that tag (see make version).
  • make push - pushes the container image to the REGISTRY.
  • make test - runs tests in cmd, pkg folders.
  • make clean - clean up temporary and build folders.

Variables

Makefile:

  • BIN - your binary name
  • PKG - your package path
  • REGISTRY - the Docker registry you want to use