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

Add container name to the /etc/hosts within the container #6683

Merged
merged 1 commit into from
Jun 21, 2020

Conversation

rhatdan
Copy link
Member

@rhatdan rhatdan commented Jun 19, 2020

Fixes: #6678

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 19, 2020
@rhatdan
Copy link
Member Author

rhatdan commented Jun 19, 2020

Does anyone know why this was not done in Docker years ago?

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

Code LGTM but I'd love to have a sentence or two about the change in the commit message.

CI is currently sick. #6684 will fix it.

@TomSweeneyRedHat
Copy link
Member

Ditto @vrothberg, code LGTM, but please add a bit of description for hysterical purposes.

@mheon
Copy link
Member

mheon commented Jun 19, 2020

Your new test is failing on rootless - probably because we only have a single host there for slirp4netns DNS

This will allow containers that connect to the network namespace be
able to use the container name directly.

For example you can do something like

podman run -ti --name foobar fedora ping foobar

While we can do this with hostname now, this seems more natural.

Also if another container connects on the network to this container it
can do

podman run --network container:foobar fedora ping foobar

And connect to the original container,without having to discover the name.

Signed-off-by: Daniel J Walsh <[email protected]>
@rhatdan rhatdan added the lgtm Indicates that a PR is ready to be merged. label Jun 21, 2020
@openshift-merge-robot openshift-merge-robot merged commit 0e4b734 into containers:master Jun 21, 2020
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add container name to hosts entry when using syntax --network container:name
6 participants