Skip to content

Instantly share code, notes, and snippets.

@dnephin
Last active July 21, 2016 21:44
Show Gist options
  • Save dnephin/5c01e66ff2d5e33768f1e89926ec4490 to your computer and use it in GitHub Desktop.
Save dnephin/5c01e66ff2d5e33768f1e89926ec4490 to your computer and use it in GitHub Desktop.
Build a minimal image for a go binary - uses files from https://github.com/dnephin/dobi
#
# Reference: http://dnephin.github.io/dobi/config.html
#
# To build the minimal dist image:
#
# dobi dist-img
#
mount=source:
bind: .
path: /go/src/github.com/dnephin/dobi
mount=dist:
bind: ./dist/bin/
path: /go/bin/
image=builder:
image: dobi-dev
context: ./dockerfiles/
dockerfile: Dockerfile.build
run=binary:
use: builder
artifact: ./dist/bin/
mounts: [source, dist]
command: "script/build"
env:
- "DOBI_BUILD_OS={env.DOBI_BUILD_OS:}"
image=dist-img:
image: dnephin/dobi
tags: ["{env.DOBI_VERSION}"]
dockerfile: dockerfiles/Dockerfile.dist
depends: [binary]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment