Public | Automated Build

Last pushed: 3 years ago
Short Description
MySQL server container (no longer supported)
Full Description


Note that this image is no longer supported.


MySQL server image. For persistent storage, you could use the cburki/mysql-data
container to store the databases data.

Build the image

To create this image, execute the following command in the docker-mysql folder.

docker build -t cburki/mysql .

Configure the image

You can configure the image with environment variables. A password is generated for
you if you omit to give one.

  • MYSQL_PASSWORD : The root password of the MySQL server.

Run the image

When you run the image, you will bind the port 3306 only if you want to expose
this port to the outside word. You do not need to bind it if you only access the
MySQL server by linking this container. MySQL will write the data in the
/data/var/lib/mysql folder which could be used from a data volume container.

docker run \
    --name mysql \
    --volumes-from mysql-data \
    -d \
    -e MYSQL_PASSWORD=my_secret_password \
    -p 3306:3306

Some setups is done the first time you run the image. If you do no set the MYSQL_PASSWORD
environment variable, a root password is generated. You can get this password by viewing
the file /data/var/state/mysql-db-pwd.txt using the following command.

docker exec -it mysql cat /data/var/state/mysql-db-pwd.txt

The volume data container could be started using the following command.

docker run \
    --name mysql-data \
    -d \
Docker Pull Command
Source Repository