From e10eb3f3e0f374ff9d09bf3d2e1cc750ea3bccbb Mon Sep 17 00:00:00 2001 From: James Jones Date: Wed, 16 Nov 2022 20:45:26 -0500 Subject: [PATCH 1/2] updating some documentation --- README.md | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0755d5a..5c6c56f 100644 --- a/README.md +++ b/README.md @@ -19,4 +19,36 @@ other self-hosted agents for other CI/CD self-hosted agents image = "quay.io/podman/stable" privileged = true network_mode = "host" -``` \ No newline at end of file +``` + +## Setting up Podman socket on build machines for use with muliple flavors of CI/CD agents + +Installed podman.socket + +``` +sudo dnf install -y podman.socket; sudo systemctl enable --now podman.socket +``` + +Created an systemd overlay to use the docker `group` on the socket file + + +aka: Create a file as `/etc/systemd/system/podman.socket.d/overlay.conf` containing: + +``` +[Socket] +SocketMode=0660 +SocketUser=root +SocketGroup=docker +``` + +Created a cat /etc/tmpfiles.d/podman.conf file containing + +``` +d /run/podman 0770 root docker +``` + +Note: This ensures that the group `docker` has permissions to use this socket. + +Finally, add the agent users to the `docker` group (whichever agent you are using). + +Run `sudo systemctl reload-daemon` and reboot (quickest way). \ No newline at end of file From c8808996542380a8e61f2d066be83babedcd5d21 Mon Sep 17 00:00:00 2001 From: James Jones Date: Wed, 16 Nov 2022 20:48:58 -0500 Subject: [PATCH 2/2] updating some documentation --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5c6c56f..c5f09e3 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ and able to use `docker` as a command as well as includes `docker-compose`. ## Notes -This job runs on a self-hosted gitlab agent with the following in the config.toml so this is also compatible with -other self-hosted agents for other CI/CD self-hosted agents +This job runs on a self-hosted gitlab agent with the following in the `/etc/gitlab-runner/config.toml` file so this is also compatible with +other self-hosted agents for other CI/CD self-hosted agents. ``` [runners.docker] @@ -23,13 +23,13 @@ other self-hosted agents for other CI/CD self-hosted agents ## Setting up Podman socket on build machines for use with muliple flavors of CI/CD agents -Installed podman.socket +First, install podman.socket ``` sudo dnf install -y podman.socket; sudo systemctl enable --now podman.socket ``` -Created an systemd overlay to use the docker `group` on the socket file +Create an systemd overlay to use the docker `group` on the socket file (note: you'll have to create this group yourself separately). aka: Create a file as `/etc/systemd/system/podman.socket.d/overlay.conf` containing: @@ -41,7 +41,7 @@ SocketUser=root SocketGroup=docker ``` -Created a cat /etc/tmpfiles.d/podman.conf file containing +Created a tmpfiles.d entry as `/etc/tmpfiles.d/podman.conf` file containing (ensuring that folder will retain the correct permissions after reboots) ``` d /run/podman 0770 root docker