nutritious-ram-11422
03/01/2023, 7:07 PMtestcontainers
& `sam aws`…
I think I found the “solution”, but i dont know if it could be solved natively by Rancher Desktop…
Here it is:
I installed the Rancher Desktop on MAC (intel), using dockerd as engine… it’s just works fine, but testcontainers and sam aws (sam build --use-container) cannot connect or find the docker environment….
the solution that I found is recreate the symlink /var/run/docker.sock
pointing it to ~/.rm/docker.sock
…
but everytime I restart the mac, this symlink just recover to the “original” path ~/.docker/run/docker.sock
should it be working like this or it should keep the symlink pointing to where I configured?
Rancher Desktop Versiob: 1.7.0
docker context is pointing to rancher-desktop who has the docker endpoint configured to ~/.rd/docker.sock
❯ docker context ls
NAME DESCRIPTION DOCKER ENDPOINT KUBERNETES ENDPOINT ORCHESTRATOR
default Current DOCKER_HOST based configuration unix:///var/run/docker.sock <https://7746C97A9B6D446EDC0E2C7B437EE8D4.gr7.us-east-1.eks.amazonaws.com> (default) swarm
rancher-desktop * Rancher Desktop moby context unix:///Users/felipe.campigoto/.rd/docker.sock
(I deleted the linux-desktop 🤔 )fast-garage-66093
03/01/2023, 8:00 PM~/.docker/run/docker.sock
nutritious-ram-11422
03/01/2023, 8:05 PMfast-garage-66093
03/01/2023, 8:09 PM/Applications/Docker.app
is gone, and not installed in $HOME/Applications/Docker.app
either?$HOME/Library/LaunchAgents
directory if you see anything in there from docker...nutritious-ram-11422
03/01/2023, 8:12 PMfast-garage-66093
03/01/2023, 8:14 PMtestcontainers
or sam aws
is trying to be helpful and changes things for you?white-xylophone-9961
03/01/2023, 8:15 PMls -ld /usr/local/bin/docker*
and ensure not pointing to Docker.app.
After starting rancher, try docker info
and if that doesn't work, sudo rm /var/run/docker.sock
and restart rancher.nutritious-ram-11422
03/01/2023, 8:16 PM~/.docker/run/docker.sock
😕
testcontainers
is just a tool for execute in unit/integration tests
fast-garage-66093
03/01/2023, 8:16 PMnutritious-ram-11422
03/01/2023, 8:17 PMfast-garage-66093
03/01/2023, 8:18 PMdocker
and docker-compose
using brew
and not use the versions provided by Rancher Desktop ?white-xylophone-9961
03/01/2023, 8:19 PMfast-garage-66093
03/01/2023, 8:21 PMdocker
and docker-compose
binaries in Rancher Desktop are from the upstream project; only the Windows versions has a small patch applied to it. So yes, the versions from brew
should work perfectly fine; I was just wondering why you prefer them, as it seems like an extra step.white-xylophone-9961
03/01/2023, 8:23 PMfast-garage-66093
03/01/2023, 8:23 PMnutritious-ram-11422
03/01/2023, 8:24 PMbrew
and download the .dmg on rancher desktop site and installed by .dmg
now I can configure administrative access
on dashboard preferences and it just works fine 🙂white-xylophone-9961
03/02/2023, 2:55 PMadministrative access
?nutritious-ram-11422
03/02/2023, 4:44 PMadministrative access
the Rancher made the symlink to /var/run/docker.sock
where the testcontainer and sam cli get the docker env/var/run/docker.sock
needs sudo
/var/run/docker.sock
every startup of SO?white-xylophone-9961
03/02/2023, 5:12 PMnutritious-ram-11422
03/02/2023, 5:13 PMsudo ln -sf /var/run/docker.sock ~/.rd/docker.sock
fast-garage-66093
03/02/2023, 5:15 PMdocker context use rancher-desktop
and not worry about it./var/run/docker.sock
, then you need the symlinknutritious-ram-11422
03/02/2023, 5:18 PMrancher-desktop
and run the tools, none worked
since I created the symlink, those tools worked like a charm
but good to know about it, thanks againfast-garage-66093
03/02/2023, 5:19 PMexport DOCKER_HOST=unix:///Users/Capiroto/.rd/docker.sock
(or whatever your user name is), and see if the tool supports that. It is an older mechanism to specify a different location for the socket, so this might work, even if docker contexts are not supported.nutritious-ram-11422
03/02/2023, 5:19 PMfast-garage-66093
03/02/2023, 5:20 PMnutritious-ram-11422
03/02/2023, 5:21 PMtestcontainer
have this env “*TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE”*
but “sam” I dont know if it have any to override itfast-garage-66093
03/02/2023, 5:21 PM/var/run
will be deleted on each boot, so you will be prompted for the admin password again every time you reboot the machinenutritious-ram-11422
03/02/2023, 5:23 PMhe annoying thing is thatI’m accepting my destiny with this 🥲 at least will be just when I startup my mac..will be deleted on each boot, so you will be prompted for the admin password again every time you reboot the machine/var/run