From c8b01d4e6a80cfc0bd6a54173619176c71e73552 Mon Sep 17 00:00:00 2001 From: Andreas Runfalk Date: Thu, 20 May 2021 15:30:10 +0200 Subject: [PATCH] Make toolboxes use the container name as hostname. This allows the user to easily see which container they are currently in instead of the generic @toolbox. --- README.md | 2 +- images/fedora/f32/README.md | 2 +- images/fedora/f33/README.md | 2 +- images/fedora/f34/README.md | 2 +- src/cmd/create.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 68270150b..116d8a988 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ This will create a container called `fedora-toolbox-`. ### Enter the toolbox: ```console [user@hostname ~]$ toolbox enter -⬢[user@toolbox ~]$ +[user@fedora-toolbox-33 ~]$ ``` ### Remove a toolbox container: diff --git a/images/fedora/f32/README.md b/images/fedora/f32/README.md index 68270150b..116d8a988 100644 --- a/images/fedora/f32/README.md +++ b/images/fedora/f32/README.md @@ -54,7 +54,7 @@ This will create a container called `fedora-toolbox-`. ### Enter the toolbox: ```console [user@hostname ~]$ toolbox enter -⬢[user@toolbox ~]$ +[user@fedora-toolbox-33 ~]$ ``` ### Remove a toolbox container: diff --git a/images/fedora/f33/README.md b/images/fedora/f33/README.md index 68270150b..116d8a988 100644 --- a/images/fedora/f33/README.md +++ b/images/fedora/f33/README.md @@ -54,7 +54,7 @@ This will create a container called `fedora-toolbox-`. ### Enter the toolbox: ```console [user@hostname ~]$ toolbox enter -⬢[user@toolbox ~]$ +[user@fedora-toolbox-33 ~]$ ``` ### Remove a toolbox container: diff --git a/images/fedora/f34/README.md b/images/fedora/f34/README.md index 68270150b..116d8a988 100644 --- a/images/fedora/f34/README.md +++ b/images/fedora/f34/README.md @@ -54,7 +54,7 @@ This will create a container called `fedora-toolbox-`. ### Enter the toolbox: ```console [user@hostname ~]$ toolbox enter -⬢[user@toolbox ~]$ +[user@fedora-toolbox-33 ~]$ ``` ### Remove a toolbox container: diff --git a/src/cmd/create.go b/src/cmd/create.go index ad75e4983..9f191a5f1 100644 --- a/src/cmd/create.go +++ b/src/cmd/create.go @@ -401,7 +401,7 @@ func createContainer(container, image, release string, showCommandToEnter bool) createArgs = append(createArgs, xdgRuntimeDirEnv...) createArgs = append(createArgs, []string{ - "--hostname", "toolbox", + "--hostname", container, "--ipc", "host", "--label", "com.github.containers.toolbox=true", "--label", "com.github.debarshiray.toolbox=true",