Public | Automated Build

Last pushed: 3 years ago
Short Description
Short description is empty for this repo.
Full Description


mysql container to restore your database's backup from Microsoft Azure Storage to
a container running mysql

Environment variables

  • _$DB_PASSWORD_ - The password to connect with Mysql
  • _$DB_USER_ - The username to connect with Mysql
  • _$DB_NAME_ - Database name
  • $CONTAINER - Container name in azure
  • _$AZURE_STORAGE_ACCOUNT_ - Name of Azure Storare Account
  • _$AZURE_STORAGE_ACCESS_KEY_ - Acess Key for Storage Account
  • _$MYSQL_PORT_ - Port to connect with Mysql. default 3306
  • _$MYSQL_HOST_ - Host where mysql is running
  • $FILE - name of the file in azure storage

By default if $FILE is not set it will download the last uploaded image.

Container startup explained

  • azure-cli will download the file from Azure Storage
  • File will be decompressed
  • Mysql database will be created with the values you pass in environment variables
  • Database bakup will be injected in mysql
  • Container will exit

Example of running

docker run --rm --name mysql-restore \
-e "DB_PASSWORD=root" \
-e "DB_USER=root" \
-e "DB_NAME=test" \
-e "AZURE_STORAGE_ACCESS_KEY=sfhbgwoovcleyfhdd=="
-e "CONTAINER=test" \
-e "HOST=" \


Building image

docker build -t fernandoneto/docker-mysql-restore-azure .
Docker Pull Command