Skip to content

[Error] Container will not start without Internet connection #1960

@PureTryOut

Description

@PureTryOut

This is a copy-paste of #1480 since that issue was closed without the problem actually being solved. I'm creating a duplicate issue in the hope any developer sees this as it seems the old issue gets missed due to being closed.
The issue is still occurring for at least Fedora 42 and Fedora 43 guest images.

Describe the bug
When using the container image Fedora:40, the container will only start if there is an available Internet connection, if not the container will not start:

$ /usr/bin/distrobox enter test
Starting container...                   	 [ OK ]
Installing basic packages...            	 Error: Failed to download metadata for repo 'updates': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for https://mirrors.fedoraproject.org/metalink?repo=updates-released-f40&arch=x86_64 [Could not resolve host: mirrors.fedoraproject.org]

However, if you use the container image Fedora:39, it will start without an Internet connection.

To Reproduce

  1. Built a container with the container image Fedora:40 and Distrobox:
/usr/bin/distrobox create -i fedora:40 -n test -a '--security-opt label=disable' -a '--tz=Europe/Paris' -Y -H "/tmp/test"
  1. Enter the container with an active Internet connection (this should work).
/usr/bin/distrobox enter test
  1. Stop the container.
/usr/bin/distrobox stop test
  1. Disable any network interface on your host and reboot your machine to have a fresh start.

  2. Use distrobox enter to enter your container (this should produce the error).

$ /usr/bin/distrobox enter test
Starting container...                   	 [ OK ]
Installing basic packages...            	 Error: Failed to download metadata for repo 'updates': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for https://mirrors.fedoraproject.org/metalink?repo=updates-released-f40&arch=x86_64 [Could not resolve host: mirrors.fedoraproject.org]

Expected behavior
If a container has been created and entered with Distrobox, it should not stop working, even without an Internet connection.

I think it's a potential problem, because you might want to use an application inside a container, when you don't have an Internet connection.

Logs

Starting container...                   	 [ OK ]
Installing basic packages...            	 Error: Failed to download metadata for repo 'updates': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for https://mirrors.fedoraproject.org/metalink?repo=updates-released-f40&arch=x86_64 [Could not resolve host: mirrors.fedoraproject.org]

Desktop (please complete the following information):

  • Are you using podman, docker or lilipod?
    Podman.
  • Which version or podman, docker or lilipod?
    podman version 5.1.1
  • Which version of distrobox?
    distrobox: 1.7.2.1
  • Which host distribution?
    Operating System: Fedora Linux 40.20240714.0 (Silverblue)
  • How did you install distrobox?
    Using rpm-ostree and Fedoras official repositories, so the packaged version by Fedora, both Podman and Distrobox.

Additional context
I found out, that if you have started the container with an Internet connection, and then later stops the container, disables Internet, it will start up fine.. So it seems like, the issue, is only when starting the container for the first time after a reboot and no active Internet connection, but it should still be possible without an active Internet connection, to use the container, in my opinion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions