containers / containers/toolbox

ubuntu container fails with `Error: failed to bind /tmp to /run/host/tmp`

Open
#906 3 comments 0 reactions 0 assignees View on GitHub
1. Bug
Dominant language
Go
Stars
3.5k
Forks
262
Avg merge
3d 1h
Merged PRs (30d)
1

Description

**Describe the bug**
I' m trying to "toolbox" an ubuntu 18.04 or a centos based on the last toolbox release. The toolbox works with sid from
https://blogs.gnome.org/alatiera/2021/03/03/toolbox-your-debian/

but fails with

```
level=debug msg="Binding /tmp to /run/host/tmp"
mount: /tmp: wrong fs type, bad option, bad superblock on /run/host/tmp, missing codepage or helper program, or other error.
Error: failed to bind /tmp to /run/host/tmp
```

**Steps how to reproduce the behaviour**
1. Get Dockerfile from https://github.com/dabrain34/petalinux-centos/tree/main/ubuntu-18.04
2. podman build -t ubuntu-18:04-toolbox .
3. toolbox create -c ubuntu-18 --image ubuntu-18:04-toolbox
4. podman start --attach ubuntu-18

```
level=debug msg="Running as real user ID 0"
level=debug msg="Resolved absolute path to the executable as /usr/bin/toolbox"
level=debug msg="TOOLBOX_PATH is /usr/local/bin/toolbox"
level=debug msg="Migrating to newer Podman"
level=debug msg="Creating /run/.toolboxenv"
level=debug msg="Monitoring host"
level=debug msg="Path /run/host/etc exists"
level=debug msg="Preparing to redirect /etc/localtime to /run/host/etc/localtime"
level=debug msg="/run/host/etc/localtime is a symbolic link"
level=warning msg="Failed to resolve /run/host/etc/localtime: lstat /usr/share/zoneinfo: no such file or directory"
level=debug msg="/run/host/etc/localtime points to /usr/share/zoneinfo/America/Toronto"
level=debug msg="Prepending /run/host to /usr/share/zoneinfo/America/Toronto"
level=debug msg="Redirecting /etc/localtime to /run/host/usr/share/zoneinfo/America/Toronto"
level=debug msg="Resolved /etc/localtime to /run/host/usr/share/zoneinfo/America/Montreal"
level=debug msg="Creating regular file /etc/machine-id"
level=debug msg="Binding /etc/machine-id to /run/host/etc/machine-id"
level=debug msg="Creating directory /run/systemd/journal"
level=debug msg="Binding /run/systemd/journal to /run/host/run/systemd/journal"
level=debug msg="Creating directory /run/udev/data"
level=debug msg="Binding /run/udev/data to /run/host/run/udev/data"
level=debug msg="Creating directory /tmp"
level=debug msg="Binding /tmp to /run/host/tmp"
mount: /tmp: wrong fs type, bad option, bad superblock on /run/host/tmp, missing codepage or helper program, or other error.
Error: failed to bind /tmp to /run/host/tmp
```

**Expected behaviour**
To run properly

**Actual behaviour**
It fails to start the container

**Screenshots**

**Output of `toolbox --version` (v0.0.90+)**
e.g., `toolbox version 0.0.99.2`

**Output of `podman version`**
e.g.,
```
Version: 3.0.1
RemoteAPI Version: 1
Go Version: go1.15.9
OS/Arch: linux/amd64
```

**Info about your OS**
Debian Sid

**Additional context**
Same issue with centos

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.