Search code examples
podman

podman container is in ephemeral state so that with server restart it won't start up automatically


I have podman image and container for mysql latest built and start/run in rhel8 server as AWS ec2 instance.

I noticed whenever I restart the server, image is still found however container is not started up automatically.

podman ps
CONTAINER ID  IMAGE       COMMAND     CREATED     STATUS      PORTS       NAMES

I believe container is in /var/lib/containers/storage/overlay-containers.

I read in somewhere container is in ephemeral state and I need to find a way to store container in non-transient state. So far my research didn't turn up much. If I understood the problem correctly, what procedure I have to run so that restart of the server would keep the container in running state?

Update:

I am looking for a clue from /etc/containers/storage.conf file. However I am not sure I am in the right place start with.


Solution

  • Unlike Docker, there is no Podman daemon to automatically start your containers when your system starts.

    If you want a container to start automatically, you need to configure that yourself -- e.g., by creating an appropriate systemd unit (possibly via podman generate systemd), or by using a tool such as quadlet.