Hi Michael,

Thanks for reaching out.

On Sat, May 29, 2021 at 10:33 PM Michael Ivanov <ivans@isle.spb.ru> wrote:

Not sure whether it is a right place o ask, but still. I am trying to run docker registry
in rootless podman. I have created a 'register' user and started the registry with the
following command:

   podman run --privileged -d  --name registry -p 5000:5000 -v /srv/registry:/var/lib/registry  --restart=always registry:latest

(/srv/registry belongs to 'registry' user, so should be visible in rootless container
as belonging to root).

So far so good, I test the register with podman search and it returns expected results.
But as soon as I exit the ssh session in which I started the container, container
terminates, not immediately but in half minute or so. There;s no diagnostic about
the reason in podman logs, nor in /var/syslog, nor in dmesg output. Just in case
I tried to start it with nohup - same result. I also tried to start it as a service
using the following file:

   Description=Containers registry
   After=syslog.target network.target

   ExecStart=/usr/bin/podman start registry
   ExecStop=/usr/bin/podman stop -t 60 registry


And it still terminates in about half a minute after service startup.

How can I find at least some indication about why this happens?

You could use strace on the container process and the corresponding conmon process to see what's going on.

I suspect that the container is getting killed, probably by systemd.  Can you try using `podman-generate-systemd` for generating the systemd unit file?

Kind regards,
Best regards,
 \   / |                                   |
 (OvO) |  Михаил Иванов                    |
 (^^^) |                                   |
  \^/  |      E-mail:  ivans@isle.spb.ru   |
  ^ ^  |                                   |
Podman mailing list -- podman@lists.podman.io
To unsubscribe send an email to podman-leave@lists.podman.io