Support for colima
kief opened this issue · 5 comments
Howdy. I use a Mac, and am using colima instead of Docker Desktop, due to the recent license changes. However, I get an error: /home/dojo/.profile: line 9: cd: /dojo/work: Permission denied
when I run dojo. My suspicion is that this is because dojo uses FUSE, and colima does not. But I don't know much about this stuff, so could be off-track.
I've had the same results with both the aws dojo image and the terraform dojo image.
Output when I run dojo
is:
kief@KiefBook:~/projects/website-infrastructure$ dojo
2021/09/14 15:50:44 [ 1] INFO: (main.main) Dojo version 0.10.3
2021/09/14 15:50:44 [49] INFO: (main.DockerDriver.HandleRun) docker command will be:
docker run --rm -v /Users/kief/projects/website-infrastructure:/dojo/work -v /Users/kief:/dojo/identity:ro -v /tmp/dojo-environment-multiline-dojo-website-infrastructure-2021-09-14_15-50-44-70783092:/etc/dojo.d/variables/00-multiline-vars.sh -v /tmp/dojo-environment-bash-functions-dojo-website-infrastructure-2021-09-14_15-50-44-70783092:/etc/dojo.d/variables/01-bash-functions.sh --env-file=/tmp/dojo-environment-dojo-website-infrastructure-2021-09-14_15-50-44-70783092 -ti --name=dojo-website-infrastructure-2021-09-14_15-50-44-70783092 kudulab/aws-dojo:0.6.0
14-09-2021 14:50:44 Dojo entrypoint info: Sourcing: /etc/dojo.d/variables/50-variables.sh
14-09-2021 14:50:44 Dojo entrypoint info: Sourcing: /etc/dojo.d/scripts/50-fix-uid-gid.sh
Assuming docker running with gRPC FUSE driver on Mac
14-09-2021 14:50:44 Dojo entrypoint info: Sourcing: /etc/dojo.d/scripts/90-run-user.sh
14-09-2021 14:50:45 Dojo entrypoint info: Sourcing: /etc/dojo.d/scripts/99-dojo-copy-aws-cred.sh
14-09-2021 14:50:45 Dojo entrypoint info: dojo init finished (interactive shell)
/home/dojo/.profile: line 9: cd: /dojo/work: Permission denied
The file permission issue is fixed upstream abiosoft/colima#2 (comment).
It should be fine now.
Works for me now, thanks!
Thanks for raising this. As part of exploration of docker desktop alternatives, we'll be tracking status of other projects.
It seems there's nothing on dojo side to stop it from working with colima + lima. However, lima has a limitation on writable volumes at the moment. That will be blocked until NixOS/nixpkgs#122420
I'm going to keep this open until we confirm dojo can be used with colima and lima in place of docker desktop.
Details
- Running dojo in a folder under
/Users
:
As expected lima mounts current directory as read-only
dojo@c6784279a770(tf-dojo):/dojo/work$ touch hi
touch: hi: Read-only file system
- Running dojo in a folder under
/tmp
:
As expected lima mounts current directory as writable, but it does not preserve permissions, so dojo entrypoint doesn't setup the ownership
dojo@7d7176c5a7aa(tf-dojo):/dojo/work$ touch hi
touch: hi: Permission denied
dojo@7d7176c5a7aa(tf-dojo):/dojo/work$ ls -la
total 8
drwxr-xr-x 2 root root 4096 Sep 23 19:33 .
drwxr-xr-x 4 root root 4096 Sep 23 19:33 ..
Hello,
For better integration between Dojo and Colima please try Dojo 0.10.5
. This version contains a fix for the issue: #31
Update on mounts
It seems the behavior of Colima/lima mounting directories has also changed. Using Dojo 0.10.5
and Colima 0.3.2
on Mac, I get the following:
- Running dojo in a folder under
/Users
:
dojo@c7651ca25c4e(inception-dojo):/dojo/work$ ls -la
total 320
-rw-r--r-- 1 dojo dialout 6148 Feb 14 09:37 .DS_Store
drwxr-xr-x 1 dojo dialout 96 Feb 20 11:27 .circleci
dojo@c7651ca25c4e(inception-dojo):/dojo/work$ touch test123
dojo@c7651ca25c4e(inception-dojo):/dojo/work$ echo $?
0
- Running dojo in a folder under
/tmp
:
dojo@34859220fb99(inception-dojo):/dojo/work$ ls -la
ls: ./colima: No such file or directory
total 100
drwxrwxrwt 26 root root 4096 Feb 20 11:40 .
drwxr-xr-x 4 root root 4096 Feb 20 11:37 ..
dojo@34859220fb99(inception-dojo):/dojo/work$ touch test123
dojo@34859220fb99(inception-dojo):/dojo/work$ echo $?
0
Closing this as the initial issue seems to be solved by an upstream fix and as the comment above also shows another fix related to Colima.
Feel free to reopen.