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

podman: add runit service #36102

Merged
merged 1 commit into from Mar 28, 2022
Merged

podman: add runit service #36102

merged 1 commit into from Mar 28, 2022

Conversation

lemmi
Copy link
Member

@lemmi lemmi commented Mar 11, 2022

Upstream Systemd service doesn't do anything special. --time=0 unix:///var/run/docker.sock is required, since we don't have socket activation.

@lemmi
Copy link
Member Author

lemmi commented Mar 12, 2022

Oh, I thought the main point of the service is to replace docker. I never thought about starting the service for anything else. What would one use it for, if not for a docker replacement?

@CameronNemo
Copy link
Contributor

Hmm. Perhaps defaulting to the docker socket makes sense then. But having it configurable is good in my opinion. E.g. for those that want remote access. Also the log level could be configurable too.

So my recommendation is OPTS="--log-level info unix:///var/run/docker.sock" in a conf file then exec podman system service --time=0 $OPTS in the service.

@lemmi
Copy link
Member Author

lemmi commented Mar 13, 2022

I can live with that. I'd still love to hear from @leahneukirchen, what they think about it.

@leahneukirchen
Copy link
Member

Imo the service should be used with sudo podman --remote, which defaults to /run/podman/podman.sock.

@the-maldridge
Copy link
Member

Hmm, perhaps we should have two services, because my intent was to use this to replace docker completely.

@lemmi
Copy link
Member Author

lemmi commented Mar 16, 2022

@the-maldridge yeah, I was thinking the same.
I also had another look around. Seems like upstream suggests this solution. They start podman with the default location, but provide a systemd config that creates a symlink from the docker default socket path to the podman socket path.
Maybe we could mimick that by providing a podman service with default options and optional config and a podman-docker service, that adds the symlink.

@leahneukirchen
Copy link
Member

Note that podman starts the socket with hard-coded 0700 permissions, so it's only usable by root by default anyway.

If you want to "replace docker completely", I don't see the problem here as just using podman instead of docker (or even aliasing it) will work. From personal experience, I'd recommend not using the docker client to speak to a podman server if you can avoid it.

@lemmi
Copy link
Member Author

lemmi commented Mar 20, 2022

As promised, I added the podman and podman-docker services. Tell me if that works for you this way.

@the-maldridge
Copy link
Member

@leahneukirchen @CameronNemo I am happy with the changes in this PR, do you have any concerns before I merge this?

@CameronNemo
Copy link
Contributor

LGTM

@Duncaen
Copy link
Member

Duncaen commented Mar 28, 2022

I don't think the fake service for the symlink is necessary or required, why not just add that to the normal service?

@lemmi lemmi merged commit cb15632 into void-linux:master Mar 28, 2022
@lemmi
Copy link
Member Author

lemmi commented Mar 28, 2022

@Duncaen that was my first suggestion, but we decided against it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants