diff --git a/images/fedora/f32/README.md b/images/fedora/f32/README.md index aaeb09346..6e06e1cd2 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- ~]$ ``` ### Remove a toolbox container: diff --git a/images/fedora/f33/README.md b/images/fedora/f33/README.md index 9138b26ad..0a090b284 100644 --- a/images/fedora/f33/README.md +++ b/images/fedora/f33/README.md @@ -57,7 +57,7 @@ This will create a container called `fedora-toolbox-`. ### Enter the toolbox: ```console [user@hostname ~]$ toolbox enter -⬢[user@toolbox ~]$ +⬢[user@fedora-toolbox- ~]$ ``` ### Remove a toolbox container: diff --git a/images/fedora/f34/README.md b/images/fedora/f34/README.md index 9138b26ad..0a090b284 100644 --- a/images/fedora/f34/README.md +++ b/images/fedora/f34/README.md @@ -57,7 +57,7 @@ This will create a container called `fedora-toolbox-`. ### Enter the toolbox: ```console [user@hostname ~]$ toolbox enter -⬢[user@toolbox ~]$ +⬢[user@fedora-toolbox- ~]$ ``` ### Remove a toolbox container: diff --git a/images/fedora/f35/README.md b/images/fedora/f35/README.md index 9138b26ad..0a090b284 100644 --- a/images/fedora/f35/README.md +++ b/images/fedora/f35/README.md @@ -57,7 +57,7 @@ This will create a container called `fedora-toolbox-`. ### Enter the toolbox: ```console [user@hostname ~]$ toolbox enter -⬢[user@toolbox ~]$ +⬢[user@fedora-toolbox- ~]$ ``` ### Remove a toolbox container: diff --git a/images/fedora/f36/README.md b/images/fedora/f36/README.md index 9138b26ad..0a090b284 100644 --- a/images/fedora/f36/README.md +++ b/images/fedora/f36/README.md @@ -57,7 +57,7 @@ This will create a container called `fedora-toolbox-`. ### Enter the toolbox: ```console [user@hostname ~]$ toolbox enter -⬢[user@toolbox ~]$ +⬢[user@fedora-toolbox- ~]$ ``` ### Remove a toolbox container: diff --git a/images/fedora/f37/README.md b/images/fedora/f37/README.md index 9138b26ad..0a090b284 100644 --- a/images/fedora/f37/README.md +++ b/images/fedora/f37/README.md @@ -57,7 +57,7 @@ This will create a container called `fedora-toolbox-`. ### Enter the toolbox: ```console [user@hostname ~]$ toolbox enter -⬢[user@toolbox ~]$ +⬢[user@fedora-toolbox- ~]$ ``` ### Remove a toolbox container: diff --git a/src/cmd/create.go b/src/cmd/create.go index b4e923651..cbab36669 100644 --- a/src/cmd/create.go +++ b/src/cmd/create.go @@ -418,8 +418,12 @@ func createContainer(container, image, release string, showCommandToEnter bool) createArgs = append(createArgs, xdgRuntimeDirEnv...) + hostname, err := os.Hostname() + containerHostname := container + "." + hostname + createArgs = append(createArgs, []string{ - "--hostname", "toolbox", + "--add-host", containerHostname + ":127.0.0.1", + "--hostname", containerHostname, "--ipc", "host", "--label", "com.github.containers.toolbox=true", }...) @@ -429,7 +433,6 @@ func createContainer(container, image, release string, showCommandToEnter bool) createArgs = append(createArgs, []string{ "--name", container, "--network", "host", - "--no-hosts", "--pid", "host", "--privileged", "--security-opt", "label=disable", diff --git a/src/cmd/initContainer.go b/src/cmd/initContainer.go index 7b35f2d82..3430bd366 100644 --- a/src/cmd/initContainer.go +++ b/src/cmd/initContainer.go @@ -177,14 +177,6 @@ func initContainer(cmd *cobra.Command, args []string) error { } } - if _, err := os.Readlink("/etc/hosts"); err != nil { - if err := redirectPath("/etc/hosts", - "/run/host/etc/hosts", - false); err != nil { - return err - } - } - if localtimeTarget, err := os.Readlink("/etc/localtime"); err != nil || localtimeTarget != "/run/host/etc/localtime" { if err := redirectPath("/etc/localtime",