Ok I figured out my problem - as I had already "podman run" redis when I try to start the service it is already running hence the conflict.  I'm changing it to podman create and all works fine.

Thanks, Ed

On Wed, Dec 9, 2020 at 6:14 AM Daniel Walsh <dwalsh@redhat.com> wrote:
On 12/8/20 17:52, Ed Haynes wrote:

#!/bin/sh


podman pull redis

sudo setsebool -P container_manage_cgroup on

podman run -d --name redis_server -p 6379:6379 redis

podman generate systemd redis_server --restart-policy=always -t 5 -f -n

mkdir -p ~/.config/systemd/user

cp ./container-redis_server.service ~/.config/systemd/user/redis_server.service

systemctl enable --user redis_server.service

systemctl start --user redis_server.service **THIS IS WHERE IT THROWS ERROR

systemctl status --user redis_server.service

I tried this and did not see an error.


First two lines are not necessary

   
podman pull redis 

# The podman run command will pull the image if it is not already there

sudo setsebool -P container_manage_cgroup on

# This was only needed if you are running a container with systemd running as PID1.
# In current Fedora it is not needed at all.


Dan

_______________________________________________
Podman mailing list -- podman@lists.podman.io
To unsubscribe send an email to podman-leave@lists.podman.io


--
Ed Haynes

SOLUTIONS ARCHITECT

ehaynes@redhat.com    M: (978)-551-0057    


TRIED. TESTED. TRUSTED.