Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Extend Dockerfile based build strategies with target build stage #1737

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SaschaSchwarze0
Copy link
Member

@SaschaSchwarze0 SaschaSchwarze0 commented Nov 21, 2024

Changes

I recently stumbled over a single Dockerfile that combined multiple output images and one had to run docker build --target STAGE to select which one should actually be built. And that was not possible with our sample build strategies because we had no parameter for the target stage. Adding this. Related Dockerfile feature: https://docs.docker.com/build/building/multi-stage/#stop-at-a-specific-build-stage

e2e will be added when shipwright-io/sample-go#16 is merged

Submitter Checklist

  • Includes tests if functionality changed/was added
  • Includes docs if changes are user-facing
  • Set a kind label on this PR
  • Release notes block has been filled in, or marked NONE

Release Notes

The Dockerfile-based sample build strategies for BuildAh, BuildKit and Kaniko now have a target parameter to define the stage to be built

@SaschaSchwarze0 SaschaSchwarze0 added this to the release-v0.15.0 milestone Nov 21, 2024
@openshift-ci openshift-ci bot added release-note Label for when a PR has specified a release note do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Nov 21, 2024
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 21, 2024
Copy link
Contributor

openshift-ci bot commented Nov 21, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from saschaschwarze0. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@SaschaSchwarze0 SaschaSchwarze0 added the kind/feature Categorizes issue or PR as related to a new feature. label Nov 21, 2024
@qu1queee
Copy link
Contributor

very interesting, can you reference https://docs.docker.com/build/building/multi-stage/#stop-at-a-specific-build-stage in the above PR description. What are the use cases on this for SHP users?

@qu1queee qu1queee self-requested a review November 25, 2024 08:14
Copy link
Contributor

@qu1queee qu1queee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 25, 2024
@SaschaSchwarze0
Copy link
Member Author

What are the use cases on this for SHP users?

The Dockerfile that I had stumbled over this is https://github.com/ONLYOFFICE/Docker-Docs/blob/v8.2.1-1/Dockerfile. It is a single Dockerfile that you must run for targets like proxy, converter or docservice to produce the different images you need for onlyoffice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note Label for when a PR has specified a release note size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants