Podman socket in macOS?
Documentation about this seems thin on the ground or outdated, or at least I'm not able to find or properly decipher the correct docs. I've got a macOS Ventura build machine that I use with GitLab CI, having installed GitLab Runner and Docker on it. I'd be interested in trying it out with Podman instead. It's probable that it won't work, given that the documentation at https://docs.gitlab.com/runner/executors/docker.html#use-podman-to-run-docke... only mentions Linux. However, the way the Docker Executor is configured to use Podman in config.toml makes it look like it just might work, if I pointed it to the Podman socket. But that's where I'm stuck. Assuming that GitLab Runner supports ssh:// socket addresses, what do I put in the 'host' row of config.toml, exactly? Or can I somehow forward the SSH socket from the Podman machine (creted using Podman Desktop) onto the host machine so that I can access it as a unix:// address? If possible, I'd like to operate Podman rootlessly for this purpose, but can go rootful if it's necessary. Thanks in advance!
On 4/19/23 10:42, jklaiho@iki.fi wrote:
Assuming that GitLab Runner supports ssh:// socket addresses
Hi, Since nobody else responded, I'll take a guess: Given how docker-centric github-actions are, I'm going to suggest challenging this assumption. Mainly because doing your second idea (making the machine socket available) is fantastically more complex. Support for `unix` and `http/https` schemes would be fairly trivial to implement. However, the `ssh` scheme is decidedly more complex (i.e. dealing with known_hosts, choosing keys, etc). Given how Docker-centric github-actions are, I'm guessing they haven't done it. Though I could be completely wrong. So I'd suggest digging into the github-runner documentation first. If not that, perhaps there's a discussion board you could post on.
I'd like to operate Podman rootlessly for this purpose
Doing this rootless isn't going to be a challenge. Making the socket accessible is the "real" challenge here. I vaguely recall there's a way to serve up a unix socket over http(s) using Apache. However it's done, you're going to need a highly customized podman-machine image to pull it off. I'm not aware of all the specifics of doing this, but it seems hard. What may be slightly simpler, is to see if you can operate the gitlab-runner inside a container on the podman-machine. Then either give it access to run nested podman containers, or leak the machine's podman socket into the runner container. Running podman inside podman is a little tricky to do, but if you ask google you'll find a number of blogs on the topic. The keys are mounting a host volume onto `$HOME/.local/share/containers` in the container, running the container --privileged, and setting some namespace options. Hope that helps! --- Chris Evich (he/him), RHCA III Senior Quality Assurance Engineer If it ain't broke, your hammer isn't wide 'nough.
participants (2)
-
Chris Evich -
jklaiho@iki.fi