Replies: 11 comments 3 replies
-
Can you share your docker-compose.yml file? |
Beta Was this translation helpful? Give feedback.
-
Sure. I've attached the one I've been using. This was originally written to work on an Ubuntu VM running on Windows and then converted to work with Docker Desktop on Mac OSx. The USERDIR variable is set to /Users/username . I've also go issues on where the docker-compose.yml file should go so it's automatically picked up. With Colima I have to use the -f option to specify where it is and I never had to do that before...but I problem at a time! |
Beta Was this translation helpful? Give feedback.
-
Yes, in fact $HOME and $USERDIR point to the same place on my Mac. I never noticed they were the same when I moved from a Linux VM to MacOS.
The docker-compose.yml file works, the problem is it creates a new folder structure of /Users/username/docker on the tmpfs drive which then runs out of space as I create the docker instances and copy my existing configurations over to the file structure in Colima.
My Colima instance has the following disk defined:
Filesystem Size Used Available Use% Mounted on
devtmpfs 10.0M 0 10.0M 0% /dev
shm 1.9G 0 1.9G 0% /dev/shm
/dev/sr0 290.0M 290.0M 0 100% /media/sr0
tmpfs 1.9G 863.2M 1.1G 44% /
tmpfs 786.5M 816.0K 785.7M 0% /run
/dev/loop0 14.1M 14.1M 0 100% /.modloop
cgroup_root 10.0M 0 10.0M 0% /sys/fs/cgroup
/dev/disk/by-label/cidata
6.9M 6.9M 0 100% /mnt/lima-cidata
/dev/disk/by-label/data-volume
58.8G 5.2G 50.6G 9% /mnt/data
/dev/disk/by-label/data-volume
58.8G 5.2G 50.6G 9% /etc
/dev/disk/by-label/data-volume
58.8G 5.2G 50.6G 9% /home
/dev/disk/by-label/data-volume
58.8G 5.2G 50.6G 9% /root
/dev/disk/by-label/data-volume
58.8G 5.2G 50.6G 9% /tmp
/dev/disk/by-label/data-volume
58.8G 5.2G 50.6G 9% /usr/local
/dev/disk/by-label/data-volume
58.8G 5.2G 50.6G 9% /var/lib
:/Users/scott/Library/Caches/colima
465.6G 324.6G 141.0G 70% /TestUsers/scott/Library/Caches/colima
:/etc/openvpn 465.6G 324.6G 141.0G 70% /etc/openvpn
/dev/disk/by-label/data-volume
58.8G 5.2G 50.6G 9% /var/lib/docker
I assume I want the file structure created on /home as that’s where the majority of the disk space is.
As I said, this all worked on a Linux VM and with Docker Desktop, so I’m not sure what I need to do differently for Colima.
Thanks for helping,
Scott
… On 24 Jan 2023, at 20:19, Abiola Ibrahim ***@***.***> wrote:
Does ${USERDIR} maps to somewhere within $HOME ?
—
Reply to this email directly, view it on GitHub <#594 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABQ4O7VQDSULHEASNQBCIGLWUA2MRANCNFSM6AAAAAAUFBVKRU>.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
-
I think I know what is happening. |
Beta Was this translation helpful? Give feedback.
-
I don’t use the —mount flag, but I do have the following in my colima.yml file:
# Colima default behaviour: $HOME and /tmp/colima are mounted as writable.
# Default: []
mounts:
- location: /etc/openvpn
writable: false
This was my attempt to match the setup I already had on the Linux VM I originally started with.
… On 25 Jan 2023, at 10:58, Abiola Ibrahim ***@***.***> wrote:
I think I know what is happening.
Do you have custom mounts for Colima? Do you specify the --mount flag or config?
—
Reply to this email directly, view it on GitHub <#594 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABQ4O7R5C7UECLF6XEMOSETWUEBNFANCNFSM6AAAAAAUFBVKRU>.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
-
Interestingly, if I code it with two mounts: I get an error that mounts is already defined. If I follow the example in the Colima.yml file, I get the following error msg:
error starting vm: overlapping mounts not supported: '/etc/openvpn/' overlaps ‘'
Additionally, it changes the - location: ~ to -location: “”
If I remove the /etc/openvpn mount, everything appears to work correctly. Maybe I can move the the information I’m trying to access to somewhere in my docker directory as it’s just a folder. I think it is only in /etc/openvpn ‘cos that’s where OpenVPN put it.
… On 25 Jan 2023, at 11:27, Abiola Ibrahim ***@***.***> wrote:
Add your HOME directory to it and it should be solved.
mounts:
- location: ~
writable: false
mounts:
- location: /etc/openvpn
writable: false
I would recommend resetting the VM and starting afresh.
What actually happened is that if you do not mount the $HOME directory, the cache directory is mounted regardless/Users/scott/Library/Caches/colima because Colima uses it internally in the VM.
Due to that, the parent directory /Users/scott/Library/Caches becomes part of the tempfs.
—
Reply to this email directly, view it on GitHub <#594 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABQ4O7W7EIOX4CGYW6SGJITWUEEYVANCNFSM6AAAAAAUFBVKRU>.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
-
Thanks again for your help in getting me this far.
Changing the location of /etc/openvpn didn’t work. It’s interesting that I can successfully perform all the the normal docker commands on transmission-van (stop, start, pull, etc), but the transmission-logs don’t show anything since 2023-01-23 10:32:25.703. So even though docker doesn’t give any errors when starting the container, I can’t access the web view and the logs don’t indicate that it’s even running. So I don’t have anywhere to look for errors to see what might be wrong. This did work in Docker Desktop and I’m pretty sure at one point I had it working with Colima, but that was before the /Users/scott folder issues were sorted out.
… On 25 Jan 2023, at 12:59, scott ***@***.***> wrote:
Interestingly, if I code it with two mounts: I get an error that mounts is already defined. If I follow the example in the Colima.yml file, I get the following error msg:
error starting vm: overlapping mounts not supported: '/etc/openvpn/' overlaps ‘'
Additionally, it changes the - location: ~ to -location: “”
If I remove the /etc/openvpn mount, everything appears to work correctly. Maybe I can move the the information I’m trying to access to somewhere in my docker directory as it’s just a folder. I think it is only in /etc/openvpn ‘cos that’s where OpenVPN put it.
> On 25 Jan 2023, at 11:27, Abiola Ibrahim ***@***.***> wrote:
>
>
> Add your HOME directory to it and it should be solved.
>
> mounts:
> - location: ~
> writable: false
> mounts:
> - location: /etc/openvpn
> writable: false
> I would recommend resetting the VM and starting afresh.
>
> What actually happened is that if you do not mount the $HOME directory, the cache directory is mounted regardless/Users/scott/Library/Caches/colima because Colima uses it internally in the VM.
> Due to that, the parent directory /Users/scott/Library/Caches becomes part of the tempfs.
>
> —
> Reply to this email directly, view it on GitHub <#594 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABQ4O7W7EIOX4CGYW6SGJITWUEEYVANCNFSM6AAAAAAUFBVKRU>.
> You are receiving this because you authored the thread.
>
|
Beta Was this translation helpful? Give feedback.
-
@ncharlez can you share your updated colima config? Is |
Beta Was this translation helpful? Give feedback.
-
The /etc/openvpn folder does exist on my MacBook. The full pathname used in the docker-compose.yml file is:
/etc/openvpn/custom/VPNCzech
The docker-compose.yml file has always been setup as:
- /etc/openvpn/custom/VPNCzech:/etc/openvpn/custom
As I said, the default Colima.yml file allows radarr, sonar, etc to run.
If I use the following Colima.yml:

With the mounts specified as:
mounts:
- location: ~
writeable: false
- location: /etc/openvpn
writeable: false
When I start Colima (colima start), I receive the following error msg:
***@***.*** / % colima start
INFO[0000] starting colima
INFO[0000] runtime: docker
INFO[0000] preparing network ... context=vm
FATA[0000] error starting vm: overlapping mounts not supported: '' overlaps '/etc/openvpn/‘
After running the start command, I noticed the start command appears to have changed my colima.yml to:
mounts:
- location: ""
writable: false
- location: /etc/openvpn
writable: false
If I change the mounts section to:
mounts:
- location: /Users/scott
writable: false
- location: /etc/openvpn
writable: false
Colima starts, but there are some messages that flash by that I can’t see. While Colima has started, none of my containers are accessible via their web interface. Docker says they are running, but I can’t get to them on the web.
If I change the mounts to:
mounts:
- location: $HOME
writable: false
- location: /etc/openvpn
writable: false
The results are the same as if I specified /Users/scott; everything says it starts, but nothing is reachable.
For completeness, I tried adding two mounts: section as you did in the initial solution, but as expected, that resulted in this msg:
***@***.*** / % colima stop
INFO[0000] stopping colima
INFO[0000] stopping ... context=docker
INFO[0013] stopping ... context=vm
INFO[0018] done
***@***.*** / % colima start
WARN[0000] config load failed: could not load config from file: yaml: unmarshal errors:
line 182: mapping key "mounts" already defined at line 179
WARN[0000] reverting to default settings
INFO[0000] starting colima
INFO[0000] runtime: docker
INFO[0000] preparing network ... context=vm
INFO[0000] starting ... context=vm
Using the existing instance "colima"
[hostagent] Starting QEMU (hint: to watch the boot progress, see "/Users/scott/.lima/colima/serial.log")
SSH Local Port: 54413
[hostagent] Waiting for the essential requirement 1 of 5: "ssh"
[hostagent] Waiting for the essential requirement 1 of 5: "ssh"
Since colima reverted to the default settings, everything in docker starts and is accessible via their web interfaces (except transmission-vpn and jacket, docker says they are running, but they are not accessible via their web interfaces).
This error also automatically reset my colima.yml file, losing any modifications I had made.
… On 25 Jan 2023, at 18:31, Abiola Ibrahim ***@***.***> wrote:
@ncharlez <https://github.com/ncharlez> can you share your updated colima config? Is /etc/openvpn a path on your macbook?
—
Reply to this email directly, view it on GitHub <#594 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABQ4O7R6QUK7264KXVE43L3WUFWRXANCNFSM6AAAAAAUFBVKRU>.
You are receiving this because you were mentioned.
|
Beta Was this translation helpful? Give feedback.
-
Hi,
After lots of trial and error, I finally managed to get some of the containers running using the following mounts section in the Colima.yml:
```yaml
# Colima default behaviour: $HOME and /tmp/colima are mounted as writable.
# Default: []
mounts:
- location: /etc/openvpn/custom/VPNCzech
mountPoint: /etc/openvpn/custom
writable: true
- location: /Volumes/Plex-osX
mountPoint: /Volumes/Plex-osX
writable: true
- location: /Users/scott
writable: true
```
Is there any documentation on what you can put in the Colima.yml file? I stumbled on the mountpoint line in a random web posting.
I still have an issue with one of my containers continuously restarting. I can run:
```
docker exec transmission-vpn ls -al /etc/openvpn/custom
```
And get the following results:
```
***@***.*** docker % docker exec transmission-vpn ls -al /etc/openvpn/custom
Error response from daemon: Container b80752fde477c30845a050210f66857d745335ccb507c06883c14ee47c847d19 is restarting, wait until the container is running
***@***.*** docker % docker exec transmission-vpn ls -al /etc/openvpn/custom
Error response from daemon: Container b80752fde477c30845a050210f66857d745335ccb507c06883c14ee47c847d19 is restarting, wait until the container is running
***@***.*** docker % docker compose stop transmission-vpn
[+] Running 1/0
⠿ Container transmission-vpn Stopped 0.0s
***@***.*** docker % docker compose start transmission-vpn
[+] Running 1/1
⠿ Container transmission-vpn Started 0.6s
***@***.*** docker % docker exec transmission-vpn ls -al /etc/openvpn/custom
total 32
-rw-r--r-- 1 505 dialout 3243 Jun 14 2022 *
drwxr-xr-x 1 505 dialout 256 Jan 27 15:52 .
drwxr-xr-x 1 root root 4096 Nov 16 21:09 ..
-rw-r--r-- 1 505 dialout 669 Jan 27 15:52 AirVPN_Czech-Republic_UDP-443.ovpn
-rw-r--r-- 1 505 dialout 2256 Jun 14 2022 ca.crt
-rw-r--r-- 1 505 dialout 636 Jun 14 2022 ta.key
-rw-r--r-- 1 505 dialout 2350 Jun 14 2022 user.crt
-rw-r--r-- 1 505 dialout 3243 Jun 14 2022 user.key
```
So it looks like the container is restarting all the time for some reason.
Can you point in the right direction for logs for the process so I can see what the error is?
Thanks.
|
Beta Was this translation helpful? Give feedback.
-
I think you are correct, but it’s not reliable. Sometimes the container starts correctly, but other times it says it can’t mount /etc/openvpn/custom/VPNCzech ‘cos it doesn’t have permission. I changed the ownership of this folder on my PC from root to my user and the mount errors now go away and the folder has the correct files in it when I ssh into Colima. Since Colima is supposed to be a direct replacement for Docker Desktop, do you have any idea why Docker Desktop handles this without changing the owner and Colima doesn’t?
While the changes got rid of the mount error, the container still restarts continuously.
Which log files should I be looking at to work out what’s wrong?
I had a look at colima start —help and colima start —edit, but they don’t explain all the options. If I wanted to help, where would I start to find all the options? Browse the code to see what it handles when process the colima.yml file?
… On 31 Jan 2023, at 13:34, Abiola Ibrahim ***@***.***> wrote:
I doubt /etc/openvpn/custom will be writable by the container. Maybe you can change the owner of the /etc/openvpn directory to your user.
Is there any documentation on what you can put in the Colima.yml file? I stumbled on the mountPoint line in a random web posting.
There are still some edge cases to be handled, hence the reason it is still hidden (though functional).
Until the wiki is populated (help needed), colima.yaml via colima start --edit and colima start --help are the docs.
—
Reply to this email directly, view it on GitHub <#594 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABQ4O7UPC6Y32KI5QU6ZHKDWVEIHHANCNFSM6AAAAAAUFBVKRU>.
You are receiving this because you were mentioned.
|
Beta Was this translation helpful? Give feedback.
-
I'm trying to convert from Docker Desktop for the Mac to Colima running on an Intel MacBook Pro (2016) with Monterey 12.6.2. I've managed to get everything installed and, sort of, working. My problem is that when I use my existing docker-compose.yml file, the /Users/username/ folder is mapped to the tempfs disk and runs out of space. I have plenty of space on the /home folder in the VM, but can't seem to get the docker-compose.yml setup to create the files there.
Beta Was this translation helpful? Give feedback.
All reactions