Open codethought opened 1 year ago
This is the issue
- /Volumes/Data/src/repos/docker/portainer/data:/data
Colima only mounts the $HOME directory by default, so your data is not being preserved.
If you must use a directory outside of $HOME, you need to override the default mounts.
colima start --mount $HOME:w --mount /Volumes/Data:w
@abiosoft tried that before.. when I do I get the following..
[1 error occurred:
* failed to prepare reverse sshfs for "/Volumes/Mac CanPro Data" on "/Volumes/Mac CanPro Data": failed to mkdir "/Volumes/Mac CanPro Data" (remote): "mkdir: can't create directory '/Volumes/Mac': Permission denied\n": exit status 1
I've tried a couple of derivatives of the command...
colima start --mount $HOME:w --mount "/Volumes/Mac CanPro Data/":w
and
colima start --mount $HOME:w --mount /Volumes/Mac\ CanPro\ Data/:w
Trying to modify the yaml configuration to put the volume in quotes doesn't work either.. The quotes get stripped and I see the same error..
@abiosoft - looks like as a workaround if I use mounts or directories with no spaces in their names I can get things working and persisting between startup and shutdown of colima.. might be work adding to the readme not to use directories with spaces in colima (at least until the issue with that is resolved)..
Thank you for the help.. great work btw..
@codethought interesting, I'll try to reproduce that on my end.
If that's indeed the case then it's a bug that should be fixed.
I'm experiencing this issue as well with 0.6.8 but I'm not even mounting any volumes, just the standard $HOME. I'm only losing containers upon restart not images...
[edit]
I take that back. containers were just stopped - docker -ps
showed nothing but docker -ps a
shows they are still there just stopped. Adding restart: always
to my compose ymls took care of it. I don't recall having to do this before but, that's that...
I'm having the same issue. If I mount the directories in colima.yaml
it doesn't make a difference. I don't have any spaces in these paths.
mounts:
- location: /Users/username
writable: true
- location: /Volumes/External-HDD
writable: true
I have the same problem with colima when restarting colima itself or my Mac. nerdctl ps -a shows a container that I have to delete and then start a new container with "nerdctl run...". And yes I do use a directory within my $HOME directory for persistent data like the pgdata directory for a postgres container. And honestly why not? It works as expected with Docker Desktop but not with colima and that container is only used for development where I need some sort of persistence. I always thought colima/nerdctl tries to be 100% compatible with Docker but that behaviour with colima is weird and in my opinion a bug that should be resolved.
Description
In trying to move from Docker Desktop to Colima I've run into a problem that I cannot figure out how to resolve. I'm able to start Colima and create docker containers via docker-compose without issue. However if I restart colima it is as I'm doing a new install/reconfiguration of the container that I've already had running. Shouldn't the state of the containers be persisting during restarts the way they did when I used Docker Desktop?
Version
Colima Version: 0.5.2 Lima Version: 0.14.2 Qemu Version: 7.2.0
Operating System
Output of
colima status
INFO[0000] colima is running using QEMU INFO[0000] arch: x86_64 INFO[0000] runtime: docker INFO[0000] mountType: sshfs INFO[0000] socket: unix:///Users/codethought/.colima/default/docker.sock INFO[0000] kubernetes: enabled
Reproduction Steps
colima stop
andcolima start
Expected behaviour
I should be able to use portainer (or any other app) after a restart of colima without having to completely reconfigure from scratch. Just like I would do in Docker Desktop
here is a copy of my colima.yaml file too
Additional context
No response