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)

  • Library installation in docker
  • Insert Docker parent host ip into container's hosts file
  • How to make a docker container directory accesible from host?
  • Windows Server 2016 Server Core set correct time with script
  • Docker | How to build and deploy war file in jboss container hosted in Docker
  • starting docker container with host mount to container
  • Please let me know what I did wrong.

  • Apache container freezes due to locked file on shared volume using Docker for Windows
  • composer cannot allocate memory inside container docker
  • cannot connect to service hosted in ECS built through cloudformation template
  • How to make volumes permanent with Docker Compose v2
  • Docker: Not a valid repository:
  • react-starter-kit asnyc action variable assignment throwing error when run in Docker
  • 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.