-
Notifications
You must be signed in to change notification settings - Fork 244
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
Allow passing extra flags to Podman/Docker #6785
Merged
openshift-merge-robot
merged 7 commits into
redhat-developer:main
from
rm3l:6421-allow-passing-extra-build-flags-to-podman-docker
May 4, 2023
Merged
Allow passing extra flags to Podman/Docker #6785
openshift-merge-robot
merged 7 commits into
redhat-developer:main
from
rm3l:6421-allow-passing-extra-build-flags-to-podman-docker
May 4, 2023
Conversation
This file contains 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
openshift-ci
bot
added
the
do-not-merge/work-in-progress
Indicates that a PR should not merge because it is a work in progress. Required by Prow.
label
May 2, 2023
Skipping CI for Draft Pull Request. |
✅ Deploy Preview for odo-docusaurus-preview ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
rm3l
force-pushed
the
6421-allow-passing-extra-build-flags-to-podman-docker
branch
from
May 3, 2023 09:06
e72359a
to
f9ff1c9
Compare
rm3l
force-pushed
the
6421-allow-passing-extra-build-flags-to-podman-docker
branch
from
May 3, 2023 20:37
9e36542
to
1d7028e
Compare
This is supported via 2 new env vars: - ODO_IMAGE_BUILD_ARGS: passed when building images via Podman/Docker - ODO_CONTAINER_RUN_ARGS: passed when running odo dev on Podman Those are comma-separated list of options that can be passed to either Podman or Docker (depending on the PODMAN_CMD env var).
…ons for 'podman play kube' Previously, we were handling 'ODO_CONTAINER_RUN_ARGS' as global options for Podman, but this turns our not being that useful if we want to pass dedicated options to 'podman play kube'. This commit introduces a new 'ODO_CONTAINER_BACKEND_GLOBAL_ARGS' env var, which will be used as global options passed to every Podman command we execute. This paves the way to isolating our Podman-related tests further using the '--root' and '--runroot' global options.
rm3l
force-pushed
the
6421-allow-passing-extra-build-flags-to-podman-docker
branch
from
May 3, 2023 21:31
1d7028e
to
07deae3
Compare
Doing so because some of the options of Podman/Docker can actually be either repeated or comma-separated.
rm3l
force-pushed
the
6421-allow-passing-extra-build-flags-to-podman-docker
branch
from
May 3, 2023 21:55
07deae3
to
978aabb
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
rm3l
changed the title
[WIP] Allow passing extra build flags to Podman/Docker
Allow passing extra flags to Podman/Docker
May 4, 2023
openshift-ci
bot
removed
the
do-not-merge/work-in-progress
Indicates that a PR should not merge because it is a work in progress. Required by Prow.
label
May 4, 2023
feloy
approved these changes
May 4, 2023
openshift-ci
bot
added
the
lgtm
Indicates that a PR is ready to be merged. Required by Prow.
label
May 4, 2023
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.
What type of PR is this:
/kind feature
What does this PR do / why we need it:
This introduces the following environment variables that allow users to pass extra args to Podman or Docker commands:
ODO_IMAGE_BUILD_ARGS
: semicolon-separated list of options to pass topodman build
ordocker build
commands when applyingImage
components from the DevfileODO_CONTAINER_RUN_ARGS
: semicolon-separated list of options to pass specifically to thepodman play kube
command (when runningodo
on Podman)ODO_CONTAINER_BACKEND_GLOBAL_ARGS
: semicolon-separated list of global options to pass to all Podman/Docker commands executed byodo
Which issue(s) this PR fixes:
Fixes #6421
PR acceptance criteria:
Unit test
Integration test
Documentation
odo
odo build-images
:odo dev
:odo deploy
:How to test changes / Special notes to the reviewer:
See the documentation pages above for examples of how to use them.