This is the repository for the mariadb-docker Docker container implemented for Gearbox. It currently provides versions 5.5.x 10.0.x 10.1.x 10.2.x 10.3.x
10.3.6
, 10.3
(10.3.6/Dockerfile)
10.2.14
, 10.2
, latest
(10.2.14/Dockerfile)
10.1.32
, 10.1
(10.1.32/Dockerfile)
10.0.34
, 10.0
(10.0.34/Dockerfile)
5.5.60
, 5.5
(5.5.60/Dockerfile)
If you want to use this container as part of Gearbox, then use the Docker Hub method. Or you can use the GitHub method to build and run the container.
(Docker Hub repo)[https://hub.docker.com/r/gearbox/mariadb/]
(Docker Cloud repo)[https://cloud.docker.com/swarm/gearbox/repository/docker/gearbox/mariadb/]
A simple docker pull gearbox/mariadb
will pull down the latest version.
start - Spin up a Docker container with the correct runtime configs.
docker run -d --name mariadb-10.3.6 --restart unless-stopped --network gearboxnet -p 3306:3306 -v $PROJECT_ROOT/sql:/docker-entrypoint-initdb.d -v mariadb_data:/var/lib/mariadb gearbox/mariadb:10.3.6
stop - Stop a Docker container.
docker stop mariadb-10.3.6
run - Run a Docker container in the foreground, (all STDOUT and STDERR will go to console). The Container be removed on termination.
docker run --rm --name mariadb-10.3.6 --network gearboxnet -p 3306:3306 -v $PROJECT_ROOT/sql:/docker-entrypoint-initdb.d -v mariadb_data:/var/lib/mariadb gearbox/mariadb:10.3.6
shell - Run a shell, (/bin/bash), within a Docker container.
docker run --rm --name mariadb-10.3.6 -i -t --network gearboxnet -p 3306:3306 -v $PROJECT_ROOT/sql:/docker-entrypoint-initdb.d -v mariadb_data:/var/lib/mariadb gearbox/mariadb:10.3.6 /bin/bash
rm - Remove the Docker container.
docker container rm mariadb-10.3.6
Simply clone this repository to your local machine
git clone https://github.com/gearboxworks/mariadb-docker.git
make build
- Build Docker images. Build all versions from the base directory or specific versions from each directory.
make list
- List already built Docker images. List all versions from the base directory or specific versions from each directory.
make clean
- Remove already built Docker images. Remove all versions from the base directory or specific versions from each directory.
make push
- Push already built Docker images to Docker Hub, (only for Gearbox admins). Push all versions from the base directory or specific versions from each directory.
When you cd
into a version directory you can also perform a few more actions.
make start
- Spin up a Docker container with the correct runtime configs.
make stop
- Stop a Docker container.
make run
- Run a Docker container in the foreground, (all STDOUT and STDERR will go to console). The Container be removed on termination.
make shell
- Run a shell, (/bin/bash), within a Docker container.
make rm
- Remove the Docker container.
make test
- Will issue a stop
, rm
, clean
, build
, create
and start
on a Docker container.