This is my docker bootstrap project for golang.
- full dockerized stack
- nothing to put in your ~/go path
- vendors management with dep
- code style lint & check
- gitlab ci pipeline
- go binary build after every file update
In order to use this bootstrap for another project:
- rename the
src/github.com/mRoca/golang-docker-bootstrapfolder path - change all the
github.com/mRoca/golang-docker-bootstrapstrings - run a
makecommand - start coding
Usage:
docker run --rm mroca/golang-docker-bootstrap say -text test- Make
- Docker
- Docker-compose
- Make
- Go
- Dep
- inotifywait (dev)
makeSee the Makefile :-)
See https://github.com/golang/go/wiki/CodeReviewComments
Check the cs
make test-csFix the cs
make fix-csAll the go commands are run in the cli docker container. If you want to use this project on your host, or if you want to be able to use autocompletion in your favorite IDE,
you can easily add it to your GOPATH variable :
export GOPATH=$HOME/go:$THIS_PROJECT_DIRECTORYSee https://github.com/golang/go/wiki/SettingGOPATH for more informations.
bin/exec commandbin/exec dep ensure -add github.com/foo/bar github.com/baz/quux
make build-prod
docker run --rm golang-docker-bootstrap say -text test