简体   繁体   中英

How to setup gitlab-runner in a podman container to use the executor option docker (to use podman)

Using podman run and setting up the gitlab-runner works withoud a problem. However, how does one now set the executor to use podman? Shell works, but this isn't as clean as using the docker executor.

Does anyone have an idea how to set the gitlab-runner container to use this executor?

I had to mount the following socket as a volume: /var/run/podman:/var/run/podman (no need for:Z on selinux). This won't be enough as the permission from the container side will only be?. To fix this add the following security opt: label:disable .

After you setup the pod, go through the registration and choose docker. Once it registered edit the config.toml with the following:

host = "unix:///var/run/podman/podman.sock"

You do not need to use privileged anywhere inorder to make gitlab-runner work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM