toolbx-images / images

Community maintained container images to use with toolbx and distrobox
https://containertoolbx.org/
Apache License 2.0
323 stars 29 forks source link

Alpine Linux images fail to start: `Error: unable to start container "d4b4a50baa952242b44a0d8e80fe2e1b232459f93a7f14601ac45cf9b199126e": crun: openat2 `media`: No such file or directory: OCI runtime attempted to invoke a command that was not found` #65

Closed jmaibaum closed 1 year ago

jmaibaum commented 1 year ago

Image and version of the image where the issue happens

Alpine 3.16, 3.17

Describe the bug

Trying to use any of the current Alpine Linux images fails with:

$ toolbox enter alpine-toolbox-3.16 
Error: failed to start container alpine-toolbox-3.16

$ podman start alpine-toolbox-3.16
Error: unable to start container "d4b4a50baa952242b44a0d8e80fe2e1b232459f93a7f14601ac45cf9b199126e": crun: openat2 `media`: No such file or directory: OCI runtime attempted to invoke a command that was not found

$ toolbox enter alpine-toolbox-3.17 
Error: failed to start container alpine-toolbox-3.17

$ podman start alpine-toolbox-3.17
Error: unable to start container "b48df8b5f30f5b3d7f59b7594ed311a97c1e52e1f9276546df8e45be9259ee8b": crun: openat2 `media`: No such file or directory: OCI runtime attempted to invoke a command that was not found

Since the podman start command mentions media being missing, maybe this is related to https://github.com/toolbx-images/images/issues/61?

/media is defined as a symlink in the image:

$ podman run --rm -it alpine-toolbox:3.17 bash
8fc47c3b71ab:/# ls -lah /media
lrwxrwxrwx 1 root root 10 Feb  6 00:28 /media -> /run/media
8fc47c3b71ab:/# cd /run/media
bash: cd: /run/media: No such file or directory

Reproduction steps

  1. toolbox create --image quay.io/toolbx-images/alpine-toolbox:3.17 (or 3.16)
  2. toolbox run alpine-toolbox-3.17

Host distribution and version, toolbx and podman versions

Distribution info

$ cat /etc/os-release 
NAME="Fedora Linux"
VERSION="37 (Workstation Edition)"
ID=fedora
VERSION_ID=37
VERSION_CODENAME=""
PLATFORM_ID="platform:f37"
PRETTY_NAME="Fedora Linux 37 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:37"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f37/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=37
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=37
SUPPORT_END=2023-11-14
VARIANT="Workstation Edition"
VARIANT_ID=workstation

Toolbx info

$ rpm -qi toolbox
Name        : toolbox
Version     : 0.0.99.3
Release     : 7.fc37
Architecture: x86_64
Install Date: Do 17 Nov 2022 20:43:07 CET
Group       : Unspecified
Size        : 7590060
License     : ASL 2.0
Signature   : RSA/SHA256, Sa 23 Jul 2022 17:20:10 CEST, Key ID f55ad3fb5323552a
Source RPM  : toolbox-0.0.99.3-7.fc37.src.rpm
Build Date  : Sa 23 Jul 2022 12:47:39 CEST
Build Host  : buildvm-x86-05.iad2.fedoraproject.org
Packager    : Fedora Project
Vendor      : Fedora Project
URL         : https://containertoolbx.org/
Bug URL     : https://bugz.fedoraproject.org/toolbox
Summary     : Tool for containerized command line environments on Linux
Description :
Toolbox is a tool for Linux operating systems, which allows the use of
containerized command line environments. It is built on top of Podman and
other standard container technologies from OCI.

Podman info

$ podman -v
podman version 4.3.1
travier commented 1 year ago

Can you try building an image with the change from https://github.com/toolbx-images/images/pull/66 and creating a toolbox from it?

jmaibaum commented 1 year ago

It seems to work. I can enter the toolbox, and /media also seems to be symlinked as expected:

$ ls -lah /media
lrwxrwxrwx 1 root root 10 Feb 11 10:12 /media -> /run/media
travier commented 1 year ago

Thanks for testing.