Is it possible to add a volume to an existing distrobox container?

I think I’ve done due diligence, but haven’t found a way.

I thought this might work, for example, but it doesn’t:

❯ distrobox create --clone ubuntu --name ubuntu-tank --volume /mnt/tank:/mnt/tank
Duplicating ubuntu...
Getting image source signatures
Copying blob f36fd4bb7334 skipped: already exists  
Copying blob 7607a3ec0008 skipped: already exists  
Copying blob 0d7df535e512 done   | 
Copying config b3c04b1720 done   | 
Writing manifest to image destination
Trying to pull localhost/ubuntu:2024-10-09...
WARN[0000] Failed, retrying in 1s ... (1/3). Error: initializing source docker://localhost/ubuntu:2024-10-09: pinging container registry localhost: Get "https://localhost/v2/": dial tcp [::1]:443: connect: connection refused 
WARN[0001] Failed, retrying in 1s ... (2/3). Error: initializing source docker://localhost/ubuntu:2024-10-09: pinging container registry localhost: Get "https://localhost/v2/": dial tcp [::1]:443: connect: connection refused 
WARN[0002] Failed, retrying in 1s ... (3/3). Error: initializing source docker://localhost/ubuntu:2024-10-09: pinging container registry localhost: Get "https://localhost/v2/": dial tcp [::1]:443: connect: connection refused 
Error: initializing source docker://localhost/ubuntu:2024-10-09: pinging container registry localhost: Get "https://localhost/v2/": dial tcp [::1]:443: connect: connection refused

It wouldn’t be the end of the world to start a new container and install everything I need, but if I could spend an hour finding a way to avoid that 10 minutes work… :slight_smile:

Turns out it’s a non-issue.
Edit /etc/distrobox/distrobox.ini
Add volume= line to the ubuntu definition.
ujust distrobox-assemble to create/replace the container.

5 Likes

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