{"id":20682228,"url":"https://github.com/yobasystems/alpine-mariadb","last_synced_at":"2025-04-12T14:57:56.232Z","repository":{"id":53923909,"uuid":"68097992","full_name":"yobasystems/alpine-mariadb","owner":"yobasystems","description":"MariaDB running on Alpine Linux [Docker]","archived":false,"fork":false,"pushed_at":"2025-03-24T18:51:54.000Z","size":256,"stargazers_count":246,"open_issues_count":2,"forks_count":73,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-04-12T14:57:50.944Z","etag":null,"topics":["alpine","amd64","arm64","armhf","database","docker","docker-image","dockerfile","mariadb","mysql","sql","yobasystems"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/yobasystems/alpine-mariadb/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yobasystems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-13T10:18:21.000Z","updated_at":"2025-03-27T00:42:07.000Z","dependencies_parsed_at":"2023-09-23T06:04:55.684Z","dependency_job_id":"d0e65ccc-e38d-4b17-8fd9-1f24c5a318e8","html_url":"https://github.com/yobasystems/alpine-mariadb","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yobasystems%2Falpine-mariadb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yobasystems%2Falpine-mariadb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yobasystems%2Falpine-mariadb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yobasystems%2Falpine-mariadb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yobasystems","download_url":"https://codeload.github.com/yobasystems/alpine-mariadb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248586249,"owners_count":21128997,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alpine","amd64","arm64","armhf","database","docker","docker-image","dockerfile","mariadb","mysql","sql","yobasystems"],"created_at":"2024-11-16T22:13:04.550Z","updated_at":"2025-04-12T14:57:56.213Z","avatar_url":"https://github.com/yobasystems.png","language":"Shell","funding_links":["https://www.buymeacoffee.com/dominictayloruk?new=1"],"categories":[],"sub_categories":[],"readme":"# MariaDB Container image running on Alpine Linux\n\n[![Docker Automated build](https://img.shields.io/docker/automated/yobasystems/alpine-mariadb.svg?style=for-the-badge\u0026logo=docker)](https://hub.docker.com/r/yobasystems/alpine-mariadb/)\n[![Docker Pulls](https://img.shields.io/docker/pulls/yobasystems/alpine-mariadb.svg?style=for-the-badge\u0026logo=docker)](https://hub.docker.com/r/yobasystems/alpine-mariadb/)\n[![Docker Stars](https://img.shields.io/docker/stars/yobasystems/alpine-mariadb.svg?style=for-the-badge\u0026logo=docker)](https://hub.docker.com/r/yobasystems/alpine-mariadb/)\n\n[![Alpine Version](https://img.shields.io/badge/Alpine%20version-v3.21.3-green.svg?style=for-the-badge\u0026logo=alpine-linux)](https://alpinelinux.org/)\n[![MariaDB Version](https://img.shields.io/badge/Mariadb%20version-v11.4.5-green.svg?style=for-the-badge\u0026logo=mariadb)](https://mariadb.org/)\n\n\nThis Container image [(yobasystems/alpine-mariadb)](https://hub.docker.com/r/yobasystems/alpine-mariadb/) is based on the minimal [Alpine Linux](https://alpinelinux.org/) with [MariaDB v11.4.5](https://mariadb.org/) (MySQL Compatible) database server.\n\n### Alpine Version 3.21.3 (Released 2025-02-13)\n##### MariaDB Version 11.4.5\n\n----\n\n\n## Table of Contents\n\n- [What is Alpine Linux?](#what-is-alpine-linux)\n- [Features](#features)\n- [Architectures](#architectures)\n- [Tags](#tags)\n- [Layers \u0026 Sizes](#layers--sizes)\n- [How to use this image](#how-to-use-this-image)\n- [Image contents \u0026 Vulnerability analysis](#image-contents--vulnerability-analysis)\n- [Source Repositories](#source-repositories)\n- [Container Registries](#container-registries)\n- [Links](#links)\n- [Donation](#donation)\n\n\n## 🏔️ What is Alpine Linux?\nAlpine Linux is a Linux distribution built around musl libc and BusyBox. The image is only 5 MB in size and has access to a package repository that is much more complete than other BusyBox based images. This makes Alpine Linux a great image base for utilities and even production applications. Read more about Alpine Linux here and you can see how their mantra fits in right at home with Container images.\n\n## What is MariaDB?\nMariaDB Server is one of the most popular database servers in the world. It's made by the original developers of MySQL and guaranteed to stay open source. Notable users include Wikipedia, WordPress.com and Google.\n\nMariaDB turns data into structured information in a wide array of applications, ranging from banking to websites. It is an enhanced, drop-in replacement for MySQL. MariaDB is used because it is fast, scalable and robust, with a rich ecosystem of storage engines, plugins and many other tools make it very versatile for a wide variety of use cases.\n\nMariaDB is developed as open source software and as a relational database it provides an SQL interface for accessing data. The latest versions of MariaDB also include GIS and JSON features.\n\n## ✨ Features\n\n* Minimal size only, minimal layers\n* Memory usage is minimal on a simple install.\n* MariaDB the MySQL replacement\n\n\n## 🏗️ Architectures\n\n* ```:amd64```, ```:x86_64``` - 64 bit Intel/AMD (x86_64/amd64)\n* ```:arm64v8```, ```:aarch64``` - 64 bit ARM (ARMv8/aarch64)\n* ```:arm32v7```, ```:armhf``` - 32 bit ARM (ARMv7/armhf)\n\n#### 📝 PLEASE CHECK TAGS BELOW FOR SUPPORTED ARCHITECTURES, THE ABOVE IS A LIST OF EXPLANATION\n\n## 🏷️ Tags\n\n* ```:latest``` latest branch based (Automatic Architecture Selection)\n* ```:amd64```, ```:x86_64```  amd64 based on latest tag but amd64 architecture\n* ```:aarch64```, ```:arm64v8``` Armv8 based on latest tag but arm64 architecture\n* ```:armhf```, ```:arm32v7``` Armv7 based on latest tag but arm32 architecture\n* ```:version``` Version tags e.g ```:10```, ```:10.11```, ```11.4.5```\n\n## 📏 Layers \u0026 Sizes\n\n![Version](https://img.shields.io/badge/version-amd64-blue.svg?style=for-the-badge)\n![MicroBadger Layers (tag)](https://img.shields.io/docker/layers/yobasystems/alpine-mariadb/amd64.svg?style=for-the-badge)\n![MicroBadger Size (tag)](https://img.shields.io/docker/image-size/yobasystems/alpine-mariadb/amd64.svg?style=for-the-badge)\n\n![Version](https://img.shields.io/badge/version-aarch64-blue.svg?style=for-the-badge)\n![MicroBadger Layers (tag)](https://img.shields.io/docker/layers/yobasystems/alpine-mariadb/aarch64.svg?style=for-the-badge)\n![MicroBadger Size (tag)](https://img.shields.io/docker/image-size/yobasystems/alpine-mariadb/aarch64.svg?style=for-the-badge)\n\n![Version](https://img.shields.io/badge/version-armhf-blue.svg?style=for-the-badge)\n![MicroBadger Layers (tag)](https://img.shields.io/docker/layers/yobasystems/alpine-mariadb/armhf.svg?style=for-the-badge)\n![MicroBadger Size (tag)](https://img.shields.io/docker/image-size/yobasystems/alpine-mariadb/armhf.svg?style=for-the-badge)\n\n\n## 🚀 How to use this image\n## Volume structure\n\n* `/var/lib/mysql`: Database files\n* `/var/lib/mysql/mysql-bin`: MariaDB logs\n\n#### Init scripts\n* `/docker-entrypoint-initdb.d` : Database backup files for a running system which already has DB\n* `/scripts/pre-exec.d` : Scripts to run before the main process\n* `/scripts/pre-init.d` : Scripts to run before the database is initialized\n* `/scripts/first-run.d` : Scripts to run only the first time the database is initialized\n\n##### Init scripts execution order\n1. `/scripts/pre-init.d`\n2. `/scripts/first-run.d`\n3. `/docker-entrypoint-initdb.d`\n4. `/scripts/pre-exec.d`\n\n## Environment Variables:\n\n### Main Mariadb parameters:\n* `MYSQL_DATABASE`: specify the name of the database\n* `MYSQL_USER`: specify the User for the database\n* `MYSQL_PASSWORD`: specify the User password for the database\n* `MYSQL_ROOT_PASSWORD`: specify the root password for Mariadb\n* `MYSQL_CHARSET`: default charset (utf8) for Mariadb\n* `MYSQL_COLLATION`: default collation (utf8_general_ci) for Mariadb\n\nIt would be best to inject these as secrets in either kubernetes or swarm\n\n#### List of Character Sets \u0026 information\n\nWhen setting charset, also make sure to choose a collation otherwise it will be the default.\n\n```\n+----------+-----------------------------+---------------------+--------+\n| Charset  | Description                 | Default collation   | Maxlen |\n+----------+-----------------------------+---------------------+--------+\n| big5     | Big5 Traditional Chinese    | big5_chinese_ci     |      2 |\n| dec8     | DEC West European           | dec8_swedish_ci     |      1 |\n| cp850    | DOS West European           | cp850_general_ci    |      1 |\n| hp8      | HP West European            | hp8_english_ci      |      1 |\n| koi8r    | KOI8-R Relcom Russian       | koi8r_general_ci    |      1 |\n| latin1   | cp1252 West European        | latin1_swedish_ci   |      1 |\n| latin2   | ISO 8859-2 Central European | latin2_general_ci   |      1 |\n| swe7     | 7bit Swedish                | swe7_swedish_ci     |      1 |\n| ascii    | US ASCII                    | ascii_general_ci    |      1 |\n| ujis     | EUC-JP Japanese             | ujis_japanese_ci    |      3 |\n| sjis     | Shift-JIS Japanese          | sjis_japanese_ci    |      2 |\n| hebrew   | ISO 8859-8 Hebrew           | hebrew_general_ci   |      1 |\n| tis620   | TIS620 Thai                 | tis620_thai_ci      |      1 |\n| euckr    | EUC-KR Korean               | euckr_korean_ci     |      2 |\n| koi8u    | KOI8-U Ukrainian            | koi8u_general_ci    |      1 |\n| gb2312   | GB2312 Simplified Chinese   | gb2312_chinese_ci   |      2 |\n| greek    | ISO 8859-7 Greek            | greek_general_ci    |      1 |\n| cp1250   | Windows Central European    | cp1250_general_ci   |      1 |\n| gbk      | GBK Simplified Chinese      | gbk_chinese_ci      |      2 |\n| latin5   | ISO 8859-9 Turkish          | latin5_turkish_ci   |      1 |\n| armscii8 | ARMSCII-8 Armenian          | armscii8_general_ci |      1 |\n| utf8     | UTF-8 Unicode               | utf8_general_ci     |      3 |\n| ucs2     | UCS-2 Unicode               | ucs2_general_ci     |      2 |\n| cp866    | DOS Russian                 | cp866_general_ci    |      1 |\n| keybcs2  | DOS Kamenicky Czech-Slovak  | keybcs2_general_ci  |      1 |\n| macce    | Mac Central European        | macce_general_ci    |      1 |\n| macroman | Mac West European           | macroman_general_ci |      1 |\n| cp852    | DOS Central European        | cp852_general_ci    |      1 |\n| latin7   | ISO 8859-13 Baltic          | latin7_general_ci   |      1 |\n| utf8mb4  | UTF-8 Unicode               | utf8mb4_general_ci  |      4 |\n| cp1251   | Windows Cyrillic            | cp1251_general_ci   |      1 |\n| utf16    | UTF-16 Unicode              | utf16_general_ci    |      4 |\n| utf16le  | UTF-16LE Unicode            | utf16le_general_ci  |      4 |\n| cp1256   | Windows Arabic              | cp1256_general_ci   |      1 |\n| cp1257   | Windows Baltic              | cp1257_general_ci   |      1 |\n| utf32    | UTF-32 Unicode              | utf32_general_ci    |      4 |\n| binary   | Binary pseudo charset       | binary              |      1 |\n| geostd8  | GEOSTD8 Georgian            | geostd8_general_ci  |      1 |\n| cp932    | SJIS for Windows Japanese   | cp932_japanese_ci   |      2 |\n| eucjpms  | UJIS for Windows Japanese   | eucjpms_japanese_ci |      3 |\n+----------+-----------------------------+---------------------+--------+\n```\n\n\u003e https://mariadb.org/\n\n## Creating an instance\n\n\n```bash\ndocker run -it --name mysql -p 3306:3306 -v /var/lib/mysql:/var/lib/mysql -e MYSQL_DATABASE=wordpressdb -e MYSQL_USER=wordpressuser -e MYSQL_PASSWORD=hguyFt6S95dgfR4ryb -e MYSQL_ROOT_PASSWORD=hguyFtgfR4r9R4r76 yobasystems/alpine-mariadb\n\n```\n\nIt will create a new db, and set mysql root password (default is RaNd0MpA$$W0Rd generated by pwgen) unless the data already exists.\n\n### Configuration without a cnf file\nMany configuration options can be passed as flags to mariadbd. This will give you the flexibility to customise the container without needing a .cnf file. For example, if you want to change the default encoding and collation for all tables to use UTF-8 (utf8mb4) just run the following:\n\n```bash\ndocker run --name some-mariadb -e MYSQL_ROOT_PASSWORD=my-secret-pw -d yobasystems/alpine-mariadb --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci\n```\n\ncommand:\n  - --character-set-server=utf8\n  - --collation-server=utf8_bin\n  - --explicit-defaults-for-timestamp=1\n\n### Configuration file location\nThe configuration file is located;\n\n  - /etc/my.cnf\n  - /etc/my.cnf.d/mariadb-server.cnf\n\n### Initialising a fresh instance\nWhen a container is started for the first time, a new database with the specified name will be created and initialised with the provided configuration variables. Furthermore, it will execute files with extensions .sh, .sql and .sql.gz that are found in /docker-entrypoint-initdb.d. Files will be executed in alphabetical order. You can easily populate your mariadb services by mounting a SQL dump into that directory and provide custom images with contributed data. SQL files will be imported by default to the database specified by the MYSQL_DATABASE variable.\n\n\n## Docker Compose example:\n\n##### (Please pass your own credentials or let them be generated automatically, don't use these ones for production!!)\n\n```yalm\nmysql:\n  image: yobasystems/alpine-mariadb\n  environment:\n    MYSQL_ROOT_PASSWORD: hguyFtgfR4r9R4r76\n    MYSQL_DATABASE: wordpressdb\n    MYSQL_USER: wordpressuser\n    MYSQL_PASSWORD: hguyFt6S95dgfR4ryb\n  expose:\n    - \"3306\"\n  volumes:\n    - /data/example/mysql:/var/lib/mysql\n  restart: always\n```\n\n## Docker Swarm example:\n\nThe following is a docker swarm example, firstly create some secrets then create the service;\n\n```\nprintf \"hguyFtgfR4r9R4r76\" | docker secret create MYSQL_ROOT_PASSWORD -\nprintf \"wordpressdb\" | docker secret create MYSQL_DATABASE -\nprintf \"wordpressuser\" | docker secret create MYSQL_USER -\nprintf \"hguyFt6S95dgfR4ryb\" | docker secret create MYSQL_PASSWORD -\nprintf \"utf8mb4\" | docker secret create MYSQL_CHARSET -\nprintf \"utf8mb4_general_ci\" | docker secret create MYSQL_COLLATION -\n\ndocker service create \\\n     --name mariadb \\\n     --replicas 1 \\\n     --secret source=MYSQL_ROOT_PASSWORD,target=mysql_root_password \\\n     --secret source=MYSQL_PASSWORD,target=mysql_password \\\n     --secret source=MYSQL_USER,target=mysql_user \\\n     --secret source=MYSQL_DATABASE,target=mysql_database \\\n     -e MYSQL_ROOT_PASSWORD_FILE=\"/run/secrets/mysql_root_password\" \\\n     -e MYSQL_PASSWORD_FILE=\"/run/secrets/mysql_password\" \\\n     -e MYSQL_USER_FILE=\"/run/secrets/mysql_user\" \\\n     -e MYSQL_DATABASE_FILE=\"/run/secrets/mysql_database\" \\\n     yobasystems/alpine-mariadb:latest\n```\n\n## 🔍 Image contents \u0026 Vulnerability analysis\n\n| PACKAGE NAME          | PACKAGE VERSION | VULNERABILITIES |\n|-----------------------|-----------------|-----------------|\n\n\n## 📚 Source Repositories\n\n* [Github - yobasystems/alpine-mariadb](https://github.com/yobasystems/alpine-mariadb)\n* [Gitlab - yobasystems/alpine-mariadb](https://gitlab.com/yobasystems/alpine-mariadb)\n* [Bitbucket - yobasystems/alpine-mariadb](https://bitbucket.org/yobasystems/alpine-mariadb/)\n\n\n## 🐳 Container Registries\n\n* [Dockerhub - yobasystems/alpine-mariadb](https://hub.docker.com/r/yobasystems/alpine-mariadb/)\n* [Quay.io - yobasystems/alpine-mariadb](https://quay.io/repository/yobasystems/alpine-mariadb)\n* [GHCR - yobasystems/alpine-mariadb](https://ghcr.io/yobasystems/alpine-mariadb)\n\n\n## 🔗 Links\n\n* [Yoba Systems](https://yoba.systems/)\n* [Github - Yoba Systems](https://github.com/yobasystems/)\n* [Dockerhub - Yoba Systems](https://hub.docker.com/u/yobasystems/)\n* [Quay.io - Yoba Systems](https://quay.io/organization/yobasystems)\n* [GHCR - Yoba Systems](https://ghcr.io/yobasystems)\n* [Maintainer - Dominic Taylor](https://github.com/dominictayloruk)\n\n## 💰 Donation\n\n[![BMAC](https://img.shields.io/badge/BUY%20ME%20A%20COFFEE-£5-blue.svg?style=for-the-badge\u0026logo=buy-me-a-coffee)](https://www.buymeacoffee.com/dominictayloruk?new=1)\n\n[![BITCOIN](https://img.shields.io/badge/BTC-bc1q7hy8qmyvq7rw6slrna7yffcdnj9rcg4e9xjecc-blue.svg?style=for-the-badge\u0026logo=bitcoin)](bitcoin:bc1q7hy8qmyvq7rw6slrna7yffcdnj9rcg4e9xjecc)\n\n[![ETHEREUM](https://img.shields.io/badge/ETH-0xb6bE2e4da3d86b50Bdae1F9B6960c23dd87C532C-blue.svg?style=for-the-badge\u0026logo=ethereum)](ethereum:0xb6bE2e4da3d86b50Bdae1F9B6960c23dd87C532C)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyobasystems%2Falpine-mariadb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyobasystems%2Falpine-mariadb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyobasystems%2Falpine-mariadb/lists"}