Hello,

Fredrik Salomonsson <[email protected]> skribis:

> E.g. I got caddy defined as follows:
>
> ```
> (service oci-service-type
>          (oci-configuration
>           (runtime 'podman)
>           (networks
>            (list
>             (oci-network-configuration
>              (name "container-network"))))
>           (containers
>            (oci-container-configuration
>              (provision "caddy")
>              (requirement '(sops-secret-caddy/env))
>              ;; TODO: build the image and package it as a guix package instead
>              (image "serfriz/caddy-duckdns:2.11.7")
>              (log-file "/var/log/caddy.log")
>              (network "container-network")
>              (ports '(("443" . "443/udp")
>                       ("443" . "443")
>                       ("80" . "80")))
>              (auto-start? #f)
>              (respawn? #t)
>              (volumes
>               '(("/srv/containers/configs/caddy" . "/etc/caddy")
>                 ("/srv/containers/data/caddy/site" . "/srv")
>                 ("/srv/containers/data/caddy/config" . "/config")
>                 ("/srv/containers/data/caddy/data" . "/data")))
>              (extra-arguments
>               (list "--cap-add=NET_ADMIN"
>                     (string-append "--env-file="
>                                    (sops-secret->secret-file
>                                     %fafner-sops-secret-caddy/env))))))
>           ;; more containers
>           ))
> ```
>
> Using sops-guix [0] to setup some secrets.
>
> [0] https://github.com/fishinthecalculator/sops-guix
>
> When I try to run it with `sudo herd start caddy` I get:
> ```
> Service user-homes has been started.
> Service rootless-podman-shared-root-fs has been started.
> Service sops-secret-caddy/env has been started.
> Service cgroups2-limits has been started.
> Service cgroups2-fs-owner has been started.
> Service podman-networks has been started.
> PID file '/run/caddy/caddy.pid' did not show up; terminating process 3778.

My guess would be that the PID file exists in the container’s name space
but not in the root name space, and the shepherd doesn’t see it.

Cc: Giacomo who knows this well. :-)

Thanks,
Ludo’.

Reply via email to