-
Notifications
You must be signed in to change notification settings - Fork 246
Allow passing extra flags to Podman/Docker #6785
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
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 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
|
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. |
e72359a to
f9ff1c9
Compare
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.
1d7028e to
07deae3
Compare
Doing so because some of the options of Podman/Docker can actually be either repeated or comma-separated.
07deae3 to
978aabb
Compare
|
Kudos, SonarCloud Quality Gate passed!
|
feloy
approved these changes
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 buildordocker buildcommands when applyingImagecomponents from the DevfileODO_CONTAINER_RUN_ARGS: semicolon-separated list of options to pass specifically to thepodman play kubecommand (when runningodoon Podman)ODO_CONTAINER_BACKEND_GLOBAL_ARGS: semicolon-separated list of global options to pass to all Podman/Docker commands executed byodoWhich issue(s) this PR fixes:
Fixes #6421
PR acceptance criteria:
Unit test
Integration test
Documentation
odoodo 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.