tilt-extensions
tilt-extensions copied to clipboard
docker_build_with_restart doesn't work with scratch
I recently ran into the issue where the docker_build_with_restart
in the restart_process
extension doesn't work if the root user doesn't exist in the image that is being used. I saw that in issue #52, the user was hardcoded to be the root user, which makes sense. However, Golang binaries are frequently deployed in scratch
containers that don't have a root user. The solution so far has been to just make a second Dockerfile that has FROM alpine
instead of FROM scratch
. It'd be great not to have to do this though.
Thanks for reporting!
I've taken the liberty of renaming the bug. You're correct that the lack of root is an issue, but the extension also relies on the existence of sh
, touch
, and date
. This shouldn't be too bad to fix. I'll take a look later this week.
It turns out getting rid of the extension's dependencies won't help much for the moment. I removed them all in a branch only to learn live_update doesn't work on scratch anyway. I've filed https://github.com/tilt-dev/tilt/issues/4303 for that.