gruntwork-io / terragrunt

Terragrunt is a flexible orchestration tool that allows Infrastructure as Code written in OpenTofu/Terraform to scale.
https://terragrunt.gruntwork.io/
MIT License
8k stars 970 forks source link

Consider publishing a terragrunt container to dockerhub? #1655

Open lorengordon opened 3 years ago

lorengordon commented 3 years ago

Would you consider hosting a Dockerfile and publishing a terragrunt container to dockerhub? I could probably do an initial PR for a Dockerfile, but someone from Gruntwork would need to setup the Dockerhub builds...

(There are lots of services for building and publishing containers, but the easiest I've found is just to use the Dockerhub automated builds, configured to trigger on branch updates to create a "latest" image and on tags to created tagged images.)

brikis98 commented 3 years ago

In the future, yes, definitely. But right now, we're too buried to do the work to set up the CI auth, publishing, etc.

lorengordon commented 3 years ago

I can open a PR for a Dockerfile at least. And I'll post a screenshot of how I setup Dockerhub builds. It was super easy, maybe 10 minutes of work.

I would suggest including only terragrunt, and let the user provide their own terraform (perhaps with a multi-stage build, for example). Otherwise, the image would have to tie a specific terraform version to the terragrunt container, or use a tool like tfenv to auto-install/select a specific version....

lorengordon commented 3 years ago

Here's the dockerhub build settings I've used for another project. It builds and publishes the latest image on any push to the master branch, and version-tagged images whenever a GitHub tag is created.

image