A minimalist MariaDB image for MySQL applications.
1.4K
10.1, latest (Dockerfile)Hands-on Docker image for MariaDB/MySQL applications.
docker pull versates/mariadbdocker run -d --name mydb versates/mariadbdocker run -d --name mydb -p 3306:3306 versates/mariadb
docker run -d --name myapp --link mydb your-app-image
MYSQL_ROOT_PASSWORDMYSQL_ROOT_PASSWORD defines the password to be used when connecting to your container as root. If not provided, a
random password will be generated and printed on stdio by the end of installation.
MYSQL_DATABASEAutomatically creates a fresh database to be used within this container.
MYSQL_USER and MYSQL_PASSWORDUsed in conjunction with MYSQL_DATABASE, creates a new user and set that user's password. This user will be granted
superuser permissions for the database specified by the MYSQL_DATABASE variable.
If MYSQL_USER is provided and MYSQL_PASSOWRD is not, a random password will be generated and printed on stdio.
docker run -d --name mydb -p 3306:3306 -e MYSQL_ROOT_PASSWORD=secret -e MYSQL_DATABASE=mydb -e MYSQL_USER=mydbuser MYSQL_PASSWORD=secret versates/mariadb
Alternatively, you can define your environment variables in the file /etc/conf.d/docker.
Create a file with the contents:
MYSQL_ROOT_PASSWORD=secret
MYSQL_DATABASE=mydb
MYSQL_USER=mydbuser
MYSQL_PASSWORD=secret
And then run:
docker run -d -p 3306:3306 -v path-to-your-local-env-file:/etc/conf.d/docker versates/mariadb
If you need to add additional features, or even load your database, you can add scripts to /var/docker/entrypoint.d.
Shell and SQL scripts are supported (be aware that bash is not nativelly supported by Alpine Linux, as it uses ash).
docker run -d -p 3306:3306 -v path-to-your-scripts-dir:/var/docker/entrypoint.d versates/mariadb
This image is officially supported on Docker version 1.12.3. Support for older versions (down to 1.7) is provided on a best-effort basis. Please see the Docker installation documentation for details on how to upgrade your Docker daemon.
You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can.
Before you start to code, we recommend discussing your plans through a GitHub issue, especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing.
Content type
Image
Digest
Size
56.6 MB
Last updated
about 8 years ago
docker pull versates/mariadb