I've pulled MySQL image from docker hub and tried to run it using
docker run (-i) (-t) -d -p 3306:3306 --name test-mysql -e MYSQL_ROOT_PASSWORD=password -d mysql:latest —innodb_buffer_pool_size=1G —character-set-server=utf8 —collation-server=utf8_general_ci —lower_case_table_names=1
but the container exits immediately.
Output for docker ps is empty while output for docker ps -a is:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
93ffbf44b3c6 mysql:latest "docker-entrypoint..." 9 seconds ago Exited (127) 8 seconds ago test-mysql
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
centos/mysql-56-centos7 latest 1d5bc23ca83b 25 hours ago 401MB
mysql latest 11615e225c92 5 days ago 408MB
I'm running docker on CentOS on AWS and from MySQL's Docker file I can see that the image uses a Debian base.
I've also tried to run the image both on the foreground and the background but neither seem to work.
I've tried using a CentOS base as well but even this exits immediately.
I'm running docker as root.