Setting up a MySQL Docker container

If you don't have an existing MySQL system to host the Quay Enterprise database on then you can run the steps below to create a dedicated MySQL container using the Oracle MySQL verified Docker image from [](

docker pull mysql:5.7

Edit these values to your liking:


Do not edit these values: (creates a 32 char password for the MySQL root user and the Quay Enterprise DB user)

MYSQL_ROOT_PASSWORD=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | sed 1q)
MYSQL_PASSWORD=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | sed 1q)

Start the MySQL container and create a new DB for Quay Enterprise:

docker \
  run \
  --detach \
  --publish 3306:3306 \

Wait about 30 seconds for the new DB to be created before testing the connection to the DB, the MySQL container will not respond during the initial DB creation process.

Alternatively you can download a simple shell script to perform the steps above:

curl --location -o /tmp/ -#

Then run:

chmod -c +x /tmp/

Note: Using Percona v5.6 for the MySQL container is known to not work at this point in time.