From 56cfdffe47958eebf4bb6a2c0f5fe046ee9fc2d7 Mon Sep 17 00:00:00 2001 From: Erik Sjölund Date: Fri, 15 Jul 2022 17:36:33 +0200 Subject: [CI:DOCS] Tutorials.rst: add socket activation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Erik Sjölund --- docs/source/Tutorials.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/Tutorials.rst b/docs/source/Tutorials.rst index 024e6847c..1c8e946db 100644 --- a/docs/source/Tutorials.rst +++ b/docs/source/Tutorials.rst @@ -13,3 +13,4 @@ Here are a number of useful tutorials to get you up and running with Podman. If * `How to use libpod for custom/derivative projects `_: How the libpod API can be used within your own project. * `How to use Podman's Go RESTful bindings `_: An introduction to using our RESTful Golang bindings in an external application. * `Common network setups `_: A basic guide to common network setups for Podman. +* `Socket activation `_: Learn how to run containers that support socket activation. -- cgit v1.2.3-54-g00ecf From c9722c0b1668f92e307c4d5e325d443cb8f77869 Mon Sep 17 00:00:00 2001 From: Erik Sjölund Date: Fri, 15 Jul 2022 20:40:51 +0200 Subject: [CI:DOCS] socket_activation.md: fix typo and layout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Erik Sjölund --- docs/tutorials/socket_activation.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/tutorials/socket_activation.md b/docs/tutorials/socket_activation.md index 7eeb1ed80..9b4b02b81 100644 --- a/docs/tutorials/socket_activation.md +++ b/docs/tutorials/socket_activation.md @@ -1,4 +1,4 @@ -## Podman socket activation +# Podman socket activation Socket activation conceptually works by having systemd create a socket (e.g. TCP, UDP or Unix socket). As soon as a client connects to the socket, systemd will start the systemd service that is @@ -13,7 +13,7 @@ Podman supports two forms of socket activation: * Socket activation of the API service * Socket activation of containers -### Socket activation of the API service +## Socket activation of the API service The architecture looks like this @@ -55,7 +55,7 @@ $ export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/podman/podman.sock $ docker-compose up ``` -### Socket activation of containers +## Socket activation of containers Since version 3.4.0 Podman supports socket activation of containers, i.e., passing a socket-activated socket to the container. Thanks to the fork/exec model of Podman, the socket will be first @@ -79,7 +79,7 @@ The container must also support socket activation. Not all software daemons supp but it's getting more popular. For instance Apache HTTP server, MariaDB, DBUS, PipeWire, Gunicorn, CUPS all have socket activation support. -#### Example: socket-activated echo server container in a systemd service +### Example: socket-activated echo server container in a systemd service Let's try out [socket-activate-echo](https://github.com/eriksjolund/socket-activate-echo/pkgs/container/socket-activate-echo), a simple echo server container that supports socket activation. @@ -121,7 +121,7 @@ WantedBy=default.target `%h` is a systemd specifier that expands to the user's home directory. -After editing the unit files, systemd needs to reload it's configuration +After editing the unit files, systemd needs to reload its configuration ``` $ systemctl --user daemon-reload @@ -152,7 +152,7 @@ hello The echo server works as expected. It replies _"hello"_ after receiving the text _"hello"_. -### Socket activate an Apache HTTP server with systemd-socket-activate +### Example: socket activate an Apache HTTP server with systemd-socket-activate Instead of setting up a systemd service to test out socket activation, an alternative is to use the command-line tool [__systemd-socket-activate__](https://www.freedesktop.org/software/systemd/man/systemd-socket-activate.html#). -- cgit v1.2.3-54-g00ecf