Distrobox with locally built containers

In order to use locally built containers (or any locally cached container), set the env variable DBX_CONTAINER_ALWAYS_PULL=0 before calling distrobox.

ie: DBX_CONTAINER_ALWAYS_PULL=0 distrobox create --image IMAGENAME:TAG --name CONTAINERNAME

Why is this Required?

When trying to create a distrbox container from a locally built image, it automatically tries to pull from a “remote” repo (docker://localhost) and fails as localhost does not advertise a docker repo. The automatic pulling is expected behavior as container_always_pull="1" is set in the distrobox.conf file. The trouble with this is that distrobox does not currently provide a flag to overwrite this option.

2 Likes