tilt-dev / tilt-extensions

Extensions for Tilt
https://tilt.dev/
Apache License 2.0
200 stars 156 forks source link

`podman_build_with_restart` doesn't appear to work without local Docker #571

Closed pedantic-git closed 4 months ago

pedantic-git commented 4 months ago

The podman extension includes a podman_build_with_restart that is implemented in terms of custom_build_with_restart. But I can't get it to work on a machine without Docker installed, because I get the error:

Failed to connect to Docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

I think this is because the custom_build_with_restart expects the image to exist in local Docker to restart it, which it doesn't in the case of a Podman build.

Has anyone got this function working? Have I done something wrong? Thanks for your help!

nicks commented 4 months ago

AFAIK, the way you're intended to use podman is to either symlink the docker socket or set DOCKER_HOST

https://podman-desktop.io/docs/migrating-from-docker/using-podman-mac-helper

tilt will respect both.

pedantic-git commented 4 months ago

Hi @nicks - I don't need a Docker socket at all to run Tilt in podman on Fedora. I'm using a Kind local registry for my images. With the exception of the podman_build_with_restart function, everything already works fine - you can read more about how I have set it up here: https://medium.com/@fishpercolator/using-tilt-kubernetes-podman-to-get-a-dev-environment-on-silverblue-without-running-anything-1a6ef7de07ee

I think the problem is with the custom_build_with_restart function, which I think makes an assumption that Docker is running and Tilt doesn't need Docker to be running.