I’m doing Rails development, and my preferred setup is using Toolbox for most of it so I can install stuff like memcached and imagemagick without layering (Toolbox is easier than creating a container for the whole app, and lets me run
rails server and whatnot without creating container scripts), and using a podman container for postgresql. I’ve been doing this for a while now, and it works really well.
After a few weeks without work on this, I got a new computer now and a clean Silverblue install, and my old setup doesn’t work anymore. This is what I’ve been doing:
podman run --name app_db -p 5432:5432 -d docker.io/postgres:10-alpine podman exec -it app_db bash -lc 'su - postgres -c "createuser --superuser root"'
Now the second command (which has always worked) fails with a
Error: cannot exec into container that is not running: container state improper and
podman ps doesn’t show the container at all.
podman stop app_db and
podman restart app_db both act like nothing’s wrong.
podman ps -a (a command I’ve never even tried until googling now) shows this:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES c8d1d8823122 docker.io/library/postgres:10-alpine postgres 32 seconds ago Exited (1) 32 seconds ago 0.0.0.0:5432->5432/tcp app_db
Any ideas? (I wanted to try here before filing a bug, since I’m relatively new to podman.)