Toolbox defaults to fedora, but endless is based on ubuntu/debian

According to toolbox documentation (or man toolbox-create) a toolbox create without any additional parameters should create a container based on a “default image matching the host OS”. On endless it offers downloading a 500MB fedora image. I think that does not match the endless base, which according to /etc/os-release is like “ubuntu debian”. Is this deliberate and why? Or should I better use a different image and/or candidate-registry?

I do not understand, what is discussed over there on github.

@ramcq When will the eos-toolbox image be available to the public?

We don’t currently make the OS packages or container images available - because the host OS is designed to be managed via ostree, the packaged experience isn’t very reliable for updates, and nothing much is designed to work with an Endless OS system because we run all apps in containers (either Flatpak or inside a toolbox container).

So I think you can disregard that part of the toolbox documentation and use whichever Debian, Ubuntu or Fedora image is most familiar/comfortable for you. Because it’s a container there isn’t much need to match the inside to the outside. We submitted patches to toolbox to help it understand Debian-based images. I’ve pulled Debian images from Docker Hub and used them with Toolbox with no problems.

toolbox: failed to create /run/.toolboxenv in container debian-latest

As toolbox is under the hood just a wrapper and some added sugar for Podman, you can always use it directly to create a Ubuntu based “Toolbox”. Just follow my Tutorial:

it appears to be reasonable to follow egraths approach, use podman directly, and skip the toolbox layer.

Sure. But the purpose of Toolbox is to do all of that for you so most apps will just work without any manual steps. I’ll see if I can reproduce Leandro’s problem above (the one not caused by typing ubuntu:18.04 instead of ubuntu-18.04 as intended).

since the main reason for me using toolbox was the need for an 32bit windows application known to run nicely in wine, I am tempted to use wine as packaged by tianon. I guess I should pull that image with the help of podman pull, and then use toolbox to create a container, right?

hmm, I’m slightly puzzled, since the toolbox readme says “This is particularly useful on OSTree based operating systems like CoreOS and Silverblue. The intention of these systems is to discourage installation of software on the host, and instead install software as (or in) containers.”

Yes, this is right. What I meant is running Endless OS inside your container, as it’s never been a direct target for anyone’s software, would be an odd choice. Our Ostree is very much like Silverblue, but it’s not based on Fedora, it’s based on the Endless derivative of Debian that is never used for anything other than turning into our Ostree.

I think my memory failed me, and in fact I have run Debian images inside podman directly, not in toolbox. In your position I would simply run Fedora inside the toolbox and use your wine app inside there - being able to rely on toolbox and not having to drive podman directly means Fedora is the path of least resistance.

Toolbox requires the images to have certain properties/commands available to make it work, that is why you can’t run a normal debian/ubuntu image directly with it.

There are some work upstream to support images for different distros (ubuntu, arch, etc) but afaik those are not ready yet.

If you want to run a debian/ubuntu image with toolbox one could create a custom image and use that as basis when creating the toolbox container. For example to create an Ubuntu 19.04 image compatible with toolbox do as follows:

  1. Create a file named Dockerfile.ubuntu-toolbox with the following contents:

LABEL com.github.containers.toolbox="true" \

RUN apt-get update && \
    apt-get -y install sudo libcap2-bin && \
    apt-get clean

RUN sed -i -e 's/ ALL$/ NOPASSWD:ALL/' /etc/sudoers

RUN touch /etc/localtime

CMD /bin/sh
  1. Build the image locally with podman build -t ubuntu-toolbox -f Dockerfile.ubuntu-toolbox. This will build a local container image named ubuntu-toolbox with tag latest (default)
  2. Create the toolbox container using the local ubuntu-toolbox image with toolbox create -i localhost/ubuntu-toolbox:latest. This will create a local container named ubuntu-toolbox-latest.
  3. Enter new toolbox container with toolbox enter -c ubuntu-toolbox-latest

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.