cannot run container after commit changes

Just basic and simple steps illustrating what I have tried:

  1. docker pull mysql/mysql-server
  2. sudo docker run -i -t mysql/mysql-server:latest /bin/bash
  3. yum install vi
  4. vi /etc/my.cnf -> bind-address=
  5. exit
  6. docker ps
  7. docker commit new_image_name
  8. docker run –name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=secret -d new_image_name

docker ps -a STATUS – Exited (1)

  • Docker on mac with VirtualBox VM in Bridged mode
  • Is there a way to add a prompt during the docker build process?
  • How to automate a docker run from a private Dockerhub repo?
  • Utilizing the --user param to create a user with a Dockerfile container
  • why does kafka docker need to listen on unix socket
  • How to expose docker container's ip and port to outside docker host without port mapping?
  • Please let me know what I did wrong.

  • Unable to use -lt when running Nginx Docker or cat logs
  • Remote Docker daemon with public access from any client?
  • Where to store data in a Kubernetes cluster
  • How can I know which docker will restart after docker daemon restarts
  • Set docker-compose environment variable to properly start Jenkins with custom java System.Property
  • Which application container is better for Docker container?
  • One Solution collect form web for “cannot run container after commit changes”

    Instead of trying to modify an existing image, try and use (for testing) MYSQL_ROOT_HOST=%.
    That would allow root login from any IP. (As seen in docker-library/mysql issue 241)

    sudo docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 -e MYSQL_ROOT_HOST=% -d mysql/mysql-server:latest

    The README mentions:

    By default, MySQL creates the 'root'@'localhost' account.
    This account can only be connected to from inside the container, requiring the use of the docker exec command as noted under Connect to MySQL from the MySQL Command Line Client.
    To allow connections from other hosts, set this environment variable.
    As an example, the value ““, which is the default Docker gateway IP, will allow connections from the Docker host machine.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.