I have installed "Development Tools"
and run the following commands:
podman pull mysql:latest # this is pulled from docker.io
podman images # lists the correct image
mkdir ~/mysql_data ; cd mysql_data
podman run -d \
--name mysql \
-p 3306:3306 \
-v ~/mysql_data:/var/lib/mysql \
-e MYSQL_ROOT_PASSWORD='My password' \
-e MYSQL_USER=dbuser \
-e MYSQL_PASSWORD='My DB password' \
-e MYSQL_DATABASE=testdb \
mysql:latest
podman ps # lists no running containers
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
podman ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
341ff9ebe686 docker.io/library/mysql:latest mysqld 7 minutes ago Created 0.0.0.0:3306->3306/tcp mysql
However, when I try to execute the next command (podman exec -it mysql /bin/bash
), I get the following error:
Error: can only create exec sessions on running containers: container state improper
What am I doing wrong?
Thanks.