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

Use container name as container hostname #383

Closed

Conversation

Jmennius
Copy link
Collaborator

@Jmennius Jmennius commented Feb 29, 2020

..to distinguish different toolboxes more easily inside a toolbox,
this includes version information too (by default).
Replace underscores with dashes since underscores are not allowed in hostnames.

Fixes: #98, #120

@softwarefactory-project-zuul
Copy link

Build failed.

@Jmennius Jmennius force-pushed the init-hostname-with-container-name branch from f1da4c2 to f318765 Compare February 29, 2020 15:35
@softwarefactory-project-zuul
Copy link

Build failed.

@elimisteve
Copy link

Good idea

Base automatically changed from master to main March 25, 2021 22:25
@Jmennius Jmennius force-pushed the init-hostname-with-container-name branch from f318765 to 66c5356 Compare May 24, 2022 07:42
@Jmennius
Copy link
Collaborator Author

Updated this to a Go-based version (was using this for a long time).

Although, with /run/.containerenv now available (containers/podman#6192) this is not so critical anymore I would say - since you can get container name from within the container.
Discussed more in #98, we can now use advanced shell prompts like romkatv/powerlevel10k for zsh and they will show which toolbox you are in (romkatv/powerlevel10k@4f3d2ff, need to enable toolbox segment).

@softwarefactory-project-zuul
Copy link

Build succeeded.

✔️ unit-test SUCCESS in 7m 11s
✔️ system-test-fedora-rawhide SUCCESS in 16m 18s
✔️ system-test-fedora-36 SUCCESS in 13m 14s
✔️ system-test-fedora-35 SUCCESS in 10m 44s
✔️ system-test-fedora-34 SUCCESS in 11m 06s

..to distinguish different toolboxes more easily inside a toolbox,
this includes version information too (by default).
Replace underscores with dashes since underscores are not allowed in hostnames.

Fixes: containers#98, containers#120
Signed-off-by: Ievgen Popovych <[email protected]>
@Jmennius Jmennius force-pushed the init-hostname-with-container-name branch from 66c5356 to 3593746 Compare May 24, 2022 08:02
@softwarefactory-project-zuul
Copy link

Build succeeded.

✔️ unit-test SUCCESS in 7m 20s
✔️ system-test-fedora-rawhide SUCCESS in 16m 52s
✔️ system-test-fedora-36 SUCCESS in 10m 49s
✔️ system-test-fedora-35 SUCCESS in 10m 54s
✔️ system-test-fedora-34 SUCCESS in 11m 06s

Copy link
Member

@debarshiray debarshiray left a comment

Choose a reason for hiding this comment

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

Thanks for working on this, @Jmennius ; and my apologies for the delay.

I know that your immediate need has been addressed already. Would you still be interested in updating this pull request to implement #969 ?

Even if we don't use the hostname of the container directly in the shell prompt, #969 still brings up some good points about the default hostname.

@debarshiray
Copy link
Member

I know that your immediate need has
been
addressed
already. Would you still be interested in updating this pull
request to implement #969 ?

Even if we don't use the hostname of the container directly in
the shell prompt, #969 still brings up some good points about
the default hostname.

#1086 is very close to implementing #969 Let's focus on that one.

Regardless, thanks for all your contributions to the Toolbx project, @Jmennius It's a pleasure to have you around. :)

@Jmennius Jmennius deleted the init-hostname-with-container-name branch April 4, 2023 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Offer a better way to visually distinguish between containers
3 participants