proposal: unified multi-stage Dockerfile#85
Draft
tamalsaha wants to merge 1 commit into
Draft
Conversation
Three nearly-identical template Dockerfiles (Dockerfile.in / .dbg /
.ubi) plus a sed-substitution dance in the Makefile is more than the
single binary they each wrap should need. The runtime requirements
differ because the base images differ; the rest is duplication.
This change adds a unified Dockerfile alongside the existing three
(neither replaces them nor changes the Makefile). It uses standard
docker build-stage targets:
docker build --target prod \
--build-arg BIN=external-dns-operator \
--build-arg BASE_PROD=<distroless-image> ...
If reviewers are happy with this layout, a follow-up PR will:
1. switch the Makefile container target to use this file with --target
2. delete Dockerfile.in / .dbg / .ubi
3. drop the {ARG_FROM} sed pipeline
Posting separately because the Makefile cutover touches the release
pipeline and shouldn't ride along on a "code review" sweep.
Signed-off-by: Tamal Saha <tamal@appscode.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three near-identical template Dockerfiles (`Dockerfile.in` / `.dbg` / `.ubi`) plus a sed-substitution dance in the Makefile is more than the single binary they each wrap should need. The runtime requirements differ because the base images differ; the rest is duplication.
This PR adds a unified `Dockerfile` alongside the existing three — it does not replace them and does not change the Makefile. The new file uses standard docker build-stage targets:
```
docker build --target prod \
--build-arg BIN=external-dns-operator \
--build-arg BASE_PROD= ...
```
Opening as draft / RFC to get sign-off on the layout. If reviewers are happy, a follow-up PR will:
Posting separately because the Makefile cutover touches the release pipeline and shouldn't ride along on a code-review sweep.
Test plan