Skip to content

Instantly share code, notes, and snippets.

@JayDoubleu
Created February 19, 2022 19:03
Show Gist options
  • Save JayDoubleu/6b39df7b313b0eccb0d31391bae4597d to your computer and use it in GitHub Desktop.
Save JayDoubleu/6b39df7b313b0eccb0d31391bae4597d to your computer and use it in GitHub Desktop.
gitlab ci runner with podman

Rootfull runner (same as docker itself)

sudo systemctl enable podman.socket
sudo systemctl start podman.socket
sudo podman run -d --name gitlab-runner --restart always --security-opt label=disable \
    -v /run/podman/podman.sock:/var/run/docker.sock \
    -v gitlab-runner-config:/etc/gitlab-runner \
    docker.io/gitlab/gitlab-runner:latest

sudo podman exec -it gitlab-runner gitlab-runner register 
sudo podman logs -ft gitlab-runner

Rootless runner

systemctl --user enable podman.socket
systemctl --user start podman.socket
podman run -d --name gitlab-runner --restart always --security-opt label=disable \
    -v /run/user/$UID/podman/podman.sock:/var/run/docker.sock \
    -v gitlab-runner-config:/etc/gitlab-runner \
    docker.io/gitlab/gitlab-runner:latest
    
podman exec -it gitlab-runner gitlab-runner register 
podman logs -ft gitlab-runner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment