Colima Docker Fun
Setting Up and Using External Drives with Colima and Docker on a Mac Mini
Part 1: Mount External Drive(s) on the Mac
- Physically connect the drives (NAS and SSD) to your Mac Mini.
- Mount a NAS network share if needed:
- Finder ➔ Go > Connect to Server
- Example:
smb://your-nas-ip-address/ShareName
- Authenticate and mount.
- Check mount points:
ls /Volumes
- You should see
/Volumes/MediaAssets
(NAS) and/Volumes/SSDMediaManager
(SSD).
- You should see
Part 2: Configure Colima to See Those Drives
- Edit your Colima config file:
vim ~/.colima/default/colima.yaml
- Ensure it includes:
mountType: virtiofs mounts: - location: /Users writable: true - location: /Volumes/MediaAssets writable: false - location: /Volumes/SSDMediaManager writable: true
Part 3: Reset Colima to Apply Config
- Reset Colima cleanly:
colima stop colima delete --force colima start --mount-type virtiofs
Part 4: Confirm Colima Setup
- Check Colima status:
colima status --json
- Confirm you see
"mount_type": "virtiofs"
.
- Confirm you see
Part 5: Make Drives Accessible to Docker Containers
- When running containers, explicitly mount drives:
docker run --rm -it \ -v /Users:/Users \ -v /Volumes/MediaAssets:/nas:ro \ -v /Volumes/SSDMediaManager:/ssd:rw \ alpine sh
Part 6: Mount Drives with the App via Docker Compose
- In your future
docker-compose.yml
:services: app: volumes: - /Volumes/MediaAssets:/nas:ro - /Volumes/SSDMediaManager:/ssd:rw
/nas
becomes the source (read-only)./ssd
becomes the working directory (read-write).
Part 7: Ensure Mounts Survive Mac Reboots
- Persistence requirements:
- Ensure the drives auto-mount at Mac login:
- For NAS: Add the mounted share to Login Items in System Settings.
- For SSD: Keep physically connected ➔ MacOS will remount.
- After a reboot:
- Confirm
/Volumes/MediaAssets
and/Volumes/SSDMediaManager
exist. - Then start Colima:
colima start
- Confirm
- Containers and devcontainers will work normally if mounts exist.
Final Notes:
- No re-editing of
colima.yaml
needed after reboot. - If drives are missing at startup, mount them first, then start Colima.
- Docker Compose or container
-v
bindings are mandatory for apps to access mounted storage.
Full flow:
- Mac ➔ Mount drives
- Colima ➔ Sees drives via virtiofs
- Docker ➔ Binds drives into containers
- App ➔ Works off
/nas
and/ssd
Reliable and repeatable after reboot.