-
Notifications
You must be signed in to change notification settings - Fork 762
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
buildah build --network add support for custom networks #3720
Conversation
docs/buildah-build.1.md
Outdated
@@ -389,7 +389,8 @@ Valid _mode_ values are: | |||
- **none**: no networking; | |||
- **host**: use the host network stack. Note: the host mode gives the container full access to local system services such as D-bus and is therefore considered insecure; | |||
- **ns:**_path_: path to a network namespace to join; | |||
- `private`: create a new namespace for the container (default) | |||
- **private**: create a new namespace for the container (default) | |||
- **\<network name|ID\>**: Join the network with the given name or ID. Only supported for rootful users. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example for this would be nice, is this --network <networkname>
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean in the description or under the example section at the bottom of the page?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but its not a blocker for me. I figured cli from tests
Renaming the PR to |
@@ -798,6 +799,8 @@ buildah build --dns-search=example.com --dns=223.5.5.5 --dns-option=use-vc . | |||
|
|||
buildah build -f Containerfile.in -t imageName . | |||
|
|||
buildah build --network mynet . | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll eventually need similar changes to the man page for podman build
if not already there.
LGTM |
Something is glitched in CI @Luap99 could you repush please and point to latest |
cc90bbb
to
b147dca
Compare
@Luap99 tests are very unhappy and you might need to rebase again. |
@Luap99 Once this gets in, do you think you are done with Buildah? IE Can we cut a release of Buildah to complete vendoring into Podman. |
Yes, but it is possible that we have to change c/common for more bugfixes. |
Sure we can revendor in containers-common as we go through the release. |
I think Podman 4.0 RC3 should be next Friday, so Wednesday sounds good. We only have three PRs that I see getting in, right now. |
tests/bud.bats
Outdated
run_buildah 125 bud --signature-policy ${TESTSDIR}/policy.json --network nontexists ${TESTSDIR}/bud/network | ||
expect_output --substring "network not found" | ||
|
||
run_buildah bud --signature-policy ${TESTSDIR}/policy.json --network podman ${TESTSDIR}/bud/network |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does the configuration for the network with this name come from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
podman is the default network name (can be changed in cotnainers.conf). If it does not exists on disk the default will always be created in memory, this happens in the libnetwork backend.
OK the problem with the in container test is that the isolation is set to |
36c3445
to
30b204c
Compare
The backend logic already supports specifying custom network names. This only adds the support for the frontend parsing. Fixes containers/podman#12282 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Happy green test buttons, but I'm not sure if this needs a rebase or not. |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Luap99, rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
What this PR does / why we need it:
The backend logic already supports specifying custom network names. This
only adds the support for the frontend parsing.
How to verify it
buildah bud --network name1,name2 ...
Which issue(s) this PR fixes:
Fixes containers/podman#12282
Special notes for your reviewer:
Does this PR introduce a user-facing change?