2 ms·
Replacing your Dockerfile with Go code
- shykes 4y agoDagger co-founder here. This bit is important: > Since Dagger can natively run Dockerfiles with full compatibility, it’s easy to wrap your existing Dockerfile in a Dagger pipeline, and gradually refactor it over time, without breaking your team’s workflow. So it’s not either-or. Gradual adoption is almost always better for any tool, unless you’re lucky enough to start completely fresh. In this case, gradual adoption means wrapping your Dockerfile in a Go “shell”, and breaking it up over time until it’s fully “digested”.
- yuppie_scum 4y agoThis really feels like adding a lot of complexity to a relatively simple, well documented and well adopted system like the Dockerfile.
- shykes 4y agoAs the original creators of the Dockerfile, we take that as a compliment :) Our goal generally is not to replace Dockerfiles with Go. In most cases, that is not a desirable goal, for the reasons you listed. However, we do think you should replace the YAML spaghetti that is your CI/CD configuration with code. That is what people use Dagger for, and in the process they often find themselves building Docker containers as part of their pipeline logic, now freshly ported to Go. As a result we frequently get asked the question: "can I rewrite my Dockerfile to Go, since I'm wrapping it in a Go pipeline anyway? Should I?". This blog post is an answer to that question.