Container providing mariadb (mysql) transactional database engine on fedora / centos / redhat
10K+
Startx mariadb is a base container used for database services published in Dockerhub registry and Quay registry. This container contain :
:latest flavour.You can use Startx mariadb image in many ways :
See more applications builders and sample on startx docker images repository
| Docker Hub repository | Content |
|---|---|
startx/sv-mariadb:latest | Fedora core rawhide + MariaDB 10.3.16 (compat mysql 15.1) |
startx/sv-mariadb:32 | Fedora core 31 + MariaDB 10.3.16 (compat mysql 15.1) |
startx/sv-mariadb:31 | Fedora core 31 + MariaDB 10.3.16 (compat mysql 15.1) |
startx/sv-mariadb:30 | Fedora core 30 + MariaDB 10.3.12 (compat mysql 15.1) |
startx/sv-mariadb:29 | Fedora core 29 + MariaDB 10.3.12 (compat mysql 15.1) |
startx/sv-mariadb:28 | Fedora core 28 + MariaDB 10.0.21 (compat mysql 15.1) |
startx/sv-mariadb:27 | Fedora core 27 + MariaDB 10.0.21 (compat mysql 15.1) |
startx/sv-mariadb:26 | Fedora core 26 + MariaDB 10.0.21 (compat mysql 15.1) |
startx/sv-mariadb:23 | Fedora core 23 + MariaDB x.x.x |
startx/sv-mariadb:22 | Fedora core 22 + MariaDB x.x.x |
startx/sv-mariadb:21 | Fedora core 21 + MariaDB x.x.x |
startx/sv-mariadb:20 | Fedora core 20 + MariaDB x.x.x |
startx/sv-mariadb:centos8 | Centos 8 + MariaDB x.x.x |
startx/sv-mariadb:centos7 | Centos 7 + MariaDB x.x.x |
startx/sv-mariadb:centos6 | Centos 6 + MariaDB x.x.x |
startx/sv-mariadb:ubi8 | RedHat UBI 8 + MariaDB x.x.x |
startx/sv-mariadb:alpine3 | Alpine 3.10 + MariaDB 10.2.14 |
If you want to be guided on setting-up and installing various containers engines (docker, podman, s2i, dockerEE, kubernetes, openshift) you can read ours containers engines guidelines.
docker run -it -p 9231:3306 --name="example-mariadb" startx/sv-mariadb
mysql -h localhost -P 9231
docker-compose.yml file with the following contentmariadb:
image: startx/sv-mariadb:latest
container_name: "example-mariadb"
mysql -h localhost -P 9231
docker-compose up -d
docker-compose logs
Openshift cluster administrator can offer this image and all its flavour to all consumers.
You can import our openshift images stream
in your openshift project.
You must be cluster-admin to add this image to the openshift project. If not, you can add it to your own
project (skip the oc project openshift command in the next script)
# swith to the openshift project
oc project openshift
# Add image streams to the service catalog (project or cluster-wide scope)
oc create -f https://raw.githubusercontent.com/startxfr/docker-images/master/Services/mariadb/openshift-imageStreams.yml
Openshift cluster administrator can add 2 build and deploy template to their consumers.
As an administrator, you can import our openshift ephemeral builder template
as well as our openshift persistent builder template
in your openshift project.
You must be cluster-admin to add this image to the openshift project. If not, you can add it to your own
project (skip the oc project openshift command in the next script)
# swith to the openshift project
oc project openshift
# Add this ephemeral template to the service catalog (project or cluster-wide scope)
oc create -f https://raw.githubusercontent.com/startxfr/docker-images/master/Services/mariadb/openshift-template-build.yml
# Add this persistent template to the service catalog (project or cluster-wide scope)
oc create -f https://raw.githubusercontent.com/startxfr/docker-images/master/Services/mariadb/openshift-template-build-persistent.yml
You can then build a database
# create an example project
oc new-project example
# start a new ephemeral database
oc process -f startx-mariadb-build-template \
-p APP_NAME=mydb-e \
| oc create -f -
# start a new persistent database
oc process -f startx-mariadb-build-persist-template \
-p APP_NAME=mydb-p \
| oc create -f -
Openshift cluster administrator can add a deploy template to their consumers.
As an administrator, you can import our openshift deploy template
in your openshift project.
You must be cluster-admin to add this image to the openshift project. If not, you can add it to your own
project (skip the oc project openshift command in the next script)
# swith to the openshift project
oc project openshift
# Add this ephemeral template to the service catalog (project or cluster-wide scope)
oc create -f https://raw.githubusercontent.com/startxfr/docker-images/master/Services/mariadb/openshift-template-deploy.yml
You can then deploy a database
# create a example project
oc new-project example
# start a new ephemeral database
oc process -f startx-mariadb-deploy-template \
-p APP_NAME=mydb-e \
| oc create -f -
# start a new persistent database
oc process -f startx-mariadb-deploy-persist-template \
-p APP_NAME=mydb-p \
| oc create -f -
Create your local project (skip if you already are in a project diretory with a run bash script)
# Create a project directory
mkdir example-project
cd example-project
# create a run script
cat << "EOF"
DROP TABLE IF EXISTS `sample`;
CREATE TABLE `sample` (
`id` int(4) unsigned NOT NULL AUTO_INCREMENT,
`key` varchar(128) NOT NULL DEFAULT '',
`val` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
KEY `key` (`key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `sample` VALUES (1,'version','0.0.1');
EOF > schema-sample.sql
Then you can use this image as an s2i builder image
# With your current directory database code
s2i build . startx/sv-mariadb:latest startx-mariadb-mydb
docker run --rm -d -p 9231:3306 startx-mariadb-mydb
# With startx database sample code repository
s2i build https://github.com/startxfr/docker-images-example-mariadb startx/sv-mariadb startx-mariadb-sample
docker run --rm -d -p 9231:3306 startx-mariadb-sample
You can use this Dockerfile template to start a new personalized container based on this container. Create a file named Dockerfile in your project directory and copy this content inside. See docker guide for instructions on how to use this file.
FROM startx/sv-mariadb:latest
#... your container specifications
| Variable | Type | Default | Description |
|---|---|---|---|
| SX_VERSION | string | latest | container version |
| SX_TYPE | string | service | Container family (os, service, application). could be enhanced |
| SX_SERVICE | string | mariadb | Define the type of service or application provided |
| SX_ID | auto | startx/sv-mariadb | Container ID coresponding to the image repository |
| SX_NAME | auto | yes | Container name |
| SX_SUMMARY | auto | yes | Container purpose description |
| SX_VERBOSE | bool | no | Display information about the execution |
| SX_DEBUG | bool | no | Display debug informations during execution |
| APP_PATH | string | /app | Path to the application |
| LOG_PATH | string | /var/log/httpd | Destination path to the log produced by the webserver |
| LOADSQL_PATH | string | /tmp/sql | Path for sql script to use when initializing database |
| SX_S2IDIR | string | /tmp | Destination path to the application pushed via s2i process |
| Variable | Description |
|---|---|
| assemble | Execute the build script on $APP_PATH application |
| post-build | Execute the post-build script |
| pre-deploy | Execute the pre-deployment script |
| post-deploy | Execute the post-deployment script |
| run | Start the application |
| isLive | Execute the liveness-probe script |
| isReady | Execute the readyness-probe script |
| info | Get information about the sx-mariadb script |
| usage | Get the usage message |
| version | Get information about the sx-mariadb version |
You can contribute or start this container initiative locally. Follow theses instructions to setup a working environment.
This section will help you if you want to :
dockercd Services/mariadbdocker build -t startx-mariadb .docker run -it startx-mariadb. If you add a second parameter (like /bin/bash) to will run this command instead of the default entrypoint. Usefull to interact with this container (ex: /bin/bash, /bin/ps -a, /bin/df -h,...)docker run -d -p 9231:3306 startx-mariadbdocker-composecd Services/mariadbdocker-compose up Startup logs appears and escaping this command stop the containerdocker-compose up -d. Container startup logs can be read using docker-compose logsContent type
Image
Digest
sha256:7a54ed434…
Size
187.8 MB
Last updated
over 1 year ago
docker pull startx/sv-mariadb