github.com/dnephin/dobi@v0.15.0/examples/minimal-docker-image/dobi.yaml (about) 1 # 2 # Build a minimal docker image for a static go binary. 3 # See README.md for a full description. 4 # 5 6 meta: 7 project: example-hello 8 9 mount=source: 10 bind: . 11 path: /go/src/github.com/example/hello 12 13 mount=dist: 14 bind: ./dist/bin/ 15 path: /go/bin/ 16 17 image=builder: 18 image: minimal-dev 19 context: . 20 dockerfile: Dockerfile.build 21 22 job=binary: 23 use: builder 24 artifact: ./dist/bin/hello 25 mounts: [source, dist] 26 annotations: 27 description: "Build the static binary" 28 29 image=dist-img: 30 image: example/hello 31 dockerfile: Dockerfile.dist 32 tags: ['{user.name}'] 33 depends: [binary] 34 annotations: 35 description: "Build the distribution image" 36 37 job=run-dist: 38 use: dist-img 39 annotations: 40 description: "Run the distribution image"