Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for podman instead of docker #2589

Closed
monester opened this issue Nov 22, 2019 · 9 comments
Closed

Support for podman instead of docker #2589

monester opened this issue Nov 22, 2019 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@monester
Copy link

Latest version of Docker doesn't work on Fedora 31 because of missing cgroupsv2 support. Can you add support for alternative container runtimes - for example podman.

@jgillich
Copy link

FYI, Docker works when you boot with systemd.unified_cgroup_hierarchy=0. Still +1 from me.

@landism
Copy link
Member

landism commented Nov 22, 2019

Can you add support for alternative container runtimes - for example podman.

Just to be sure I understand, is the issue with the container runtime or the image builder? (it's common to conflate the two since they often come as one package)

For the image builder, tilt supports non-docker image builders via custom_build.

For the container runtime, I believe as long as you're not using restart_container with live_update, the container runtime does not matter to Tilt. (and if you want to use restart_container with a non-docker runtime, there's rerun-process-wrapper as a workaround.

@jgillich
Copy link

I think this is about image building, so the relevant tool is buildah.

I still have a lot of confusion around registries, but custom_build does not seem to be a full replacement because Tilt still assumes the result is an image stored in Docker. You could do disable_push=True, but it seems like Tilt has some mechanisms built in to override a remote registry with a in-cluster registry (or does it?), so doing a push via buildah would break that.

Besides, I think there's still some value in supporting buildah natively. When you work in a team and people are using different platforms, not everyone will be using the same container builder/runtime. podman/buildah do not require a daemon or even root access, that's why they're seeing more and more adoption.

@jazzdan jazzdan added the bug Something isn't working label Nov 25, 2019
@nicks
Copy link
Member

nicks commented Nov 25, 2019

let me poke at this a bit and write docs on how to do it.

ideally, i'd want custom_build to be powerful enough that you could implement docker_build as just a thin wrapper around custom_build. And then there'd be a bunch of off-the-shelf Tiltfile functions for how to use custom builds that you could load() or copy-and-paste.

custom_build should be smart enough to handle in-cluster registries correctly but i'll check that too

@monester
Copy link
Author

@nicks thanks! amazing job! I'm going to test it now.

@nicks
Copy link
Member

nicks commented Nov 25, 2019

we actually needed to do some fixes on the Tilt side, which will be available in the next release. I'm also going to add a bit to our custom_build guide, but for reference, here's a demo Tiltfile where i got it working:

https://github.com/windmilleng/tilt-frontend-demo/blob/nicks/buildah/Tiltfile

@monester
Copy link
Author

can't test as I can't build binary :-(

# make all
....
FAIL
FAIL	github.com/windmilleng/tilt/internal/tiltfile	13.045s
ok  	github.com/windmilleng/tilt/internal/tiltfile/analytics	(cached)
ok  	github.com/windmilleng/tilt/internal/tiltfile/dockerprune	(cached)
ok  	github.com/windmilleng/tilt/internal/tiltfile/flags	(cached)
ok  	github.com/windmilleng/tilt/internal/tiltfile/git	(cached)
ok  	github.com/windmilleng/tilt/internal/tiltfile/include	(cached)
?   	github.com/windmilleng/tilt/internal/tiltfile/io	[no test files]
ok  	github.com/windmilleng/tilt/internal/tiltfile/k8scontext	(cached)
ok  	github.com/windmilleng/tilt/internal/tiltfile/os	(cached)
ok  	github.com/windmilleng/tilt/internal/tiltfile/starkit	(cached)
?   	github.com/windmilleng/tilt/internal/tiltfile/value	[no test files]
ok  	github.com/windmilleng/tilt/internal/tiltfile/version	(cached)
ok  	github.com/windmilleng/tilt/internal/token	(cached)
ok  	github.com/windmilleng/tilt/internal/tracer	(cached)
ok  	github.com/windmilleng/tilt/internal/watch	(cached)
ok  	github.com/windmilleng/tilt/internal/yaml	(cached)
ok  	github.com/windmilleng/tilt/pkg/assets	(cached)
ok  	github.com/windmilleng/tilt/pkg/logger	(cached)
ok  	github.com/windmilleng/tilt/pkg/model	(cached)
?   	github.com/windmilleng/tilt/pkg/webview	[no test files]
?   	github.com/windmilleng/tilt/tools/devlog	[no test files]
?   	github.com/windmilleng/tilt/web	[no test files]
FAIL
make: *** [Makefile:58: test-go] Error 1

Will wait until next release.

@nicks
Copy link
Member

nicks commented Nov 26, 2019

OK, v0.10.22 should have a new argument to custom_build called skips_local_docker=True that skips the image check so you can use buildah. I've updated the branch with more details:
https://github.com/windmilleng/tilt-frontend-demo/blob/nicks/buildah/Tiltfile

@nicks nicks closed this as completed Nov 26, 2019
@nicks
Copy link
Member

nicks commented Nov 26, 2019

Added some documentation to the custom_build guide on how to use buildah:
https://docs.tilt.dev/custom_build.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants