Golang builder that includes the Glide dependency-management tool
3.8K
Simple docker image to build golang apps which are using glide (https://github.com/Masterminds/glide) as dependency manager and a docker image which includes the app. The image is based on the golang:1.8.3-alpine image.
Building the app only
docker run --rm -v [PATH_TO_YOUR_APP]:/go/src/app golang-builder [FLAGS]
Your app directory should contain a Dockerfile which should be used to build the app docker image. Then you can run
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v [PATH_TO_YOUR_APP]:/go/src/[APP_DIR_NAME] -e DOCKER_IMAGE [YOUR_DOCKER_IMAGE_NAME] golang-builder [FLAGS]
Dockerfile example could be:
FROM gliderlabs/alpine
RUN apk add --no-cache ca-certificates
copy ./my_fancy_app /
WORKDIR /
ENTRYPOINT ["/my_fancy_app"]
Build command example:
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd):/go/src/app -e DOCKER_IMAGE=matlockx/datadog-metrics-tuner matlockx/golang-builder -ldflags "-X=main.buildTime=2016-01-12_11:17:04AM -X=main.gitHash=80cb93c613cf1d5db4cc6c44e2ef27c4636a066a" -o datadog-metrics-tuner
Content type
Image
Digest
Size
170.5 MB
Last updated
about 9 years ago
docker pull skidder/golang-builder