geofffranks / spruce

A BOSH template merge tool
MIT License
431 stars 78 forks source link

Add Dockerfile to create base layer image #282

Closed HeavyWombat closed 5 years ago

HeavyWombat commented 5 years ago

I read the issue regarding the Dockerfile for Spruce. Although I never really ran into the use case with Spruce, we used something similar in another project. The other part of the puzzle are the Docker Hub automatic builds, which help to create the Docker images. Please note, this Dockerfile comes with the idea of creating the binary from scratch based on the current working directory. For Concourse and its Docker related resources, it would need to be written differently I think. This would address part of the issue #281.

The Docker Hub Build settings would need to look like this:

image
$ docker run -it --rm heavywombat/spruce:1.19.42 spruce --version
Unable to find image 'heavywombat/spruce:1.19.42' locally
1.19.42: Pulling from heavywombat/spruce
6a27eeff4259: Pull complete
Digest: sha256:30b0bf4db871dfacbe4f6150d637fa0258d6553cc2d288f844f1a55301190b04
Status: Downloaded newer image for heavywombat/spruce:1.19.42
spruce - Version 1.19.42