diff options
author | Christian Breunig <christian@breunig.cc> | 2024-09-06 17:57:24 +0200 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2024-09-06 18:05:23 +0200 |
commit | f67e217f2716937115a3bdf6d316b172bbec75e5 (patch) | |
tree | 4d6bf9aa3d5866e0585b1e490995789035718f4c /src | |
parent | 689002845733b73674d77ba9756822483a5464f1 (diff) | |
download | vyos-1x-f67e217f2716937115a3bdf6d316b172bbec75e5.tar.gz vyos-1x-f67e217f2716937115a3bdf6d316b172bbec75e5.zip |
container: T6702: re-add missing UNIX API socket
During podman upgrade and a build from the original source the UNIX socket
definition for systemd got lost in translation.
This commit re-adds the UNIX socket which is started on boot to interact with
Podman.
Example:
curl --unix-socket /run/podman/podman.sock -H 'content-type: application/json' \
-sf http://localhost/containers/json
Diffstat (limited to 'src')
-rw-r--r-- | src/systemd/podman.service | 16 | ||||
-rw-r--r-- | src/systemd/podman.socket | 10 |
2 files changed, 26 insertions, 0 deletions
diff --git a/src/systemd/podman.service b/src/systemd/podman.service new file mode 100644 index 000000000..20a16304b --- /dev/null +++ b/src/systemd/podman.service @@ -0,0 +1,16 @@ +[Unit] +Description=Podman API Service +Requires=podman.socket +After=podman.socket +Documentation=man:podman-system-service(1) +StartLimitIntervalSec=0 + +[Service] +Delegate=true +Type=exec +KillMode=process +Environment=LOGGING="--log-level=info" +ExecStart=/usr/bin/podman $LOGGING system service + +[Install] +WantedBy=default.target diff --git a/src/systemd/podman.socket b/src/systemd/podman.socket new file mode 100644 index 000000000..397058ee4 --- /dev/null +++ b/src/systemd/podman.socket @@ -0,0 +1,10 @@ +[Unit] +Description=Podman API Socket +Documentation=man:podman-system-service(1) + +[Socket] +ListenStream=%t/podman/podman.sock +SocketMode=0660 + +[Install] +WantedBy=sockets.target |