Open nicks opened 2 years ago
i can repro but haven't figured out what the issue is yet
OK, confirmed that this is a bug in Rancher Desktop (or one of its subcomponents). You can reproduce it from the commandline. Launch any container in Rancher Desktop, then run:
echo hi | docker exec -i [CONTAINER] cat -
On Docker Desktop, this command prints 'hi', then exits.
On Rancher Desktop, this command prints 'hi', then hangs indefinitely.
On Docker Desktop, tilt does live_update commands directly through the container runtime (docker exec) rather than through the apiserver (kubectl exec). In theory, we could add a workaround for Rancher Desktop, but this would still be broken for other things (e.g., docker-compose on rancher desktop) so probably better to get it fixed upstream.
Thanks for the detailed explanation. I managed to solve the issue with live_update by switching from dockerd to containerd runtime in rancher desktop. And in the tiltfile use nerdctl_build instead of docker_build. Works great!
So there is only a issue when you use rancher desktop for windows + rancher dockerd runtime + tile.
ooh that's a good workaround thanks!!
Thanks for the detailed explanation. I managed to solve the issue with live_update by switching from dockerd to containerd runtime in rancher desktop. And in the tiltfile use nerdctl_build instead of docker_build. Works great!
So there is only a issue when you use rancher desktop for windows + rancher dockerd runtime + tile.
I can confirm this works as a fix for me as well!
If anyone else needs another workaround you can use devcontainers in vscode as well. Set rancher desktop to moby. configure your project with devcontainer running on ubuntu (in my case). Config devcontainer for docker from docker and install tilt and kubectl inside container. Copy over kube config to container. Profit! If anyone wants my configs how this is setup please take a look at the sample project I tossed together https://github.com/Go2Engle/tilt-in-devcontainer
@Go2Engle Have you been able to get live update to work with vscode devcontainer and docker compose? I have tried rancher desktop and docker desktop on two different computers. I have tried docker-in-docker and docker-with-docker on both systems. Either way, live update never picks up the changes. As soon as I open locally, boom live update off and running.
Don't want to hijack this issue, if have this working then I will keep searching. I just searched for devcontainer and found this issue.
@nahlian I dont have much experience with devcontainer with docker compose. Feel free to shoot me an email(found on my profile) and id be glad test for you.
@nahlian Regarding devcontainers, incl. docker-in-docker, docker-outside-of-docker, docker-outside-of-docker-compose, the updated docs:
https://code.visualstudio.com/remote/advancedcontainers/use-docker-kubernetes
From the tilt channel:
Output of
tilt doctor
: