-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add --hosts-file flag; Add nohosts to remote build APIs #21062
Add --hosts-file flag; Add nohosts to remote build APIs #21062
Conversation
8549fcb
to
d4afcbb
Compare
Hi @rhatdan, thank you for reviewing the changes. My idea is to provide a container and pod level override in
The current podman/libpod/container_internal_common.go Lines 2282 to 2288 in 7dc7cbf
Do you think this fits into the wider Podman design and roadmap? I am open to changing anything or even starting from scratch. |
I am fine with this, but I do not think --hosts-file="null" Use only Podman managed entries Bottom line for me is discoverability for these. Having them all named and documented in the man page together would help users figure out which is best for them. Having a random --no-hosts someone else in the man page, does not help with this. Better names/descriptions are always welcome. |
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.
--no-hosts
is a well known docker option so we should not remove it from the docs and this option does not replace this option at all.
We should make the connection between the two options clear int he man page, i.e. --no-hosts should link to --hosts-file and the other way around.
@rhatdan @Luap99 Sounds like we have two directions here.
I'm leaning towards (2) since we have a configuration item in |
I say we should do 2 |
Since docker supports the --no-host, then go with 2 |
A friendly reminder that this PR had no activity for 30 days. |
@gavinkflam Still working on this? |
Yes. I'll find some time to wrap up the changes. Thanks. |
d4afcbb
to
daf01f1
Compare
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.
Thanks mostly looks good but I think we can do a bit better on the tests
451a94e
to
4b70680
Compare
Thank you for the suggestions, @Luap99! I’ve enhanced the tests and implemented the flag for pod create. The pod create command now uses this flag to configure the infra-container appropriately. Additionally, I’ve renamed the container During testing, I discovered that image builds using the |
4b70680
to
d614069
Compare
d614069
to
c791acf
Compare
c791acf
to
0df45fa
Compare
Reverted rename and rebased. |
Signed-off-by: Gavin Lam <[email protected]>
* Add --hosts-file flag to container create, container run and pod create * Add HostsFile field to pod inspect and container inspect results * Test BaseHostsFile config in containers.conf Signed-off-by: Gavin Lam <[email protected]>
0df45fa
to
4f7395f
Compare
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.
LGTM
Thank you
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gavinkflam, 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 |
/packit retest-failed |
/lgtm |
70c2559
into
containers:main
I added a container level base-hosts-file configuration in #21013. This PR allows user to apply this configuration using a CLI flag. cc @Luap99
This is intended to be a container / pod level override of
base_hosts_file
incontainers.conf
. https://github.com/containers/common/blob/main/docs/containers.conf.5.md#containers-tableCloses #13277
Does this PR introduce a user-facing change?