MariaDB is a popular open source relational database that was created by the original developers of MySQL. MariaDB is developed as open source software and as a relational database it provides an SQL interface for accessing data.
This MariaDB distribution is provided by the upstream MariaDB packaging team.
Run a temporary container with MariaDB
docker run --rm -it sourcemation/mariadb
docker run --name mariadb-server \
-e MARIADB_ROOT_PASSWORD=my-secret-pw \
-p 3306:3306 \
-d sourcemation/mariadb
docker run --name mariadb-server \
-e MARIADB_ROOT_PASSWORD=my-secret-pw \
-e MARIADB_DATABASE=myapp \
-e MARIADB_USER=myuser \
-e MARIADB_PASSWORD=mypass \
-p 3306:3306 \
-d sourcemation/mariadb
docker run --name mariadb-server \
-e MARIADB_ROOT_PASSWORD=my-secret-pw \
-v mariadb-data:/var/lib/mysql \
-p 3306:3306 \
-d sourcemation/mariadb
docker run --name mariadb-server \
-e MARIADB_ROOT_PASSWORD=my-secret-pw \
-v /path/to/init-scripts:/docker-entrypoint-initdb.d:ro \
-v mariadb-data:/var/lib/mysql \
-p 3306:3306 \
-d sourcemation/mariadb
The sourcemation/mariadb image itself comes in debian-13 flavor. The tag latest refers to the Debian-based flavor.
This image uses the following environment variables:
APP_NAME="mariadb"
APP_VERSION="13.0.2"
MARIADB_ROOT_PASSWORD=<password> # Set root password
MARIADB_RANDOM_ROOT_PASSWORD=no
MARIADB_ALLOW_EMPTY_PASSWORD=no
# Optional database creation:
MARIADB_DATABASE=<database_name> # Create database on startup
MARIADB_USER=<username> # Create user on startup
MARIADB_PASSWORD=<password> # Password for MARIADB_USER
# Backwards compatibility (legacy MySQL_ variables are also supported):
MYSQL_ROOT_PASSWORD, MYSQL_DATABASE, MYSQL_USER, MYSQL_PASSWORD, etc.
This image exposes the following ports:
3306 - MariaDB server portThis image defines the following volumes:
/var/lib/mysql - Database data directory/docker-entrypoint-initdb.d - Initialization scripts directoryPlease note that the ports need to be either manually forwarded with the -p option or let Docker choose some for you with the -P option.
We'd love for you to contribute! You can request new features, report bugs, or submit a pull request with your contribution to this image on the Sourcemation GitHub repository.
Disclaimer: The sourcemation/mariadb image is not affiliated with the MariaDB Foundation. The respective companies and organisations own the trademarks mentioned in the offering. The sourcemation/mariadb image is a separate project and is maintained by Sourcemation.
The container supports initialization scripts that will be executed when the database is first created. Place your scripts in the /docker-entrypoint-initdb.d directory:
*.sh files will be executed as shell scripts*.sql files will be executed as SQL scripts*.sql.gz and *.sql.xz files will be decompressed and executed as SQL scriptsmysql user (non-root) for improved securityA detailed risk analysis report of the image and its components can be found on the Sourcemation platform.
For more information, check out the overview of MariaDB page.
The base license for the solution (MariaDB) is the GPLv2. The licenses for each component shipped as part of this image can be found on the image's appropriate Sourcemation entry.
Content type
Image
Digest
sha256:d965be1da…
Size
107.9 MB
Last updated
3 days ago
docker pull sourcemation/mariadb