Skip to content

MariaDB DB-Server Docker Image for AARCH64, ARMv7l, X86 and X64

Notifications You must be signed in to change notification settings

tsitle/dockerimage-db-mariadb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MariaDB DB-Server Docker Image for AARCH64, ARMv7l, X86 and X64

Provides a MariaDB database server.

MariaDB 10.0 is compatible with MySQL 5.6.
MariaDB 10.1 is compatible with MySQL 5.6.
MariaDB 10.2 is compatible with MySQL 5.6/5.7.
MariaDB 10.3 is compatible with MySQL 5.7/8.0.
MariaDB 10.4 is compatible with MySQL 8.0.
MariaDB 10.5 is compatible with MySQL 8.0.

DB-Server TCP Port

The DB-Server is listening on TCP port 3306 by default.

Healthcheck script

The image also contains a healthcheck script at /usr/local/bin/healthcheck.sh.
This script can be used in a docker-compose.yaml file like this:

version: '3.5'
services:
  db:
    image: "db-mariadb-<ARCH>:<VERSION>"
    ports:
      - "3306:3306"
    volumes:
      - "$PWD/mpdata/mariadb/<VERSION>/intern:/var/lib/mysql"
      - "$PWD/mpdata/mariadb/<VERSION>/extern:/root/extDbFiles"
    environment:
      - CF_SYSUSR_MYSQL_USER_ID=<YOUR_UID>
      - CF_SYSUSR_MYSQL_GROUP_ID=<YOUR_GID>
      - CF_DB_ROOT_PASSWORD=<PASSWORD>
    healthcheck:
      test: ["CMD", "/usr/local/bin/healthcheck.sh"]
      interval: 30s
      timeout: 10s
      retries: 5

Docker Container usage

See the related GitHub repository https://github.com/tsitle/dockercontainer-db-mariadb

Docker Container configuration

  • CF_SYSUSR_MYSQL_USER_ID [int]: User-ID for user that ownes the database files
  • CF_SYSUSR_MYSQL_GROUP_ID [int]: Group-ID for group that ownes the database files
  • CF_MYSQL_MAX_ALLOWED_PACKET [string]: Size string (e.g. "128M")
  • CF_MYSQL_INNODB_BUFFER_POOL_SIZE [string]: Size string (e.g. "8G")
  • CF_MYSQL_INNODB_LOG_FILE_SIZE [string]: Size string (e.g. "64M")
  • CF_MYSQL_INNODB_PAGE_SIZE [string]: Size string (e.g. "64k")
  • CF_MYSQL_TABLE_OPEN_CACHE [int]: Maximum number of open tables cached in one table cache instance (e.g. "2000")
  • CF_MYSQL_TABLE_DEF_CACHE [int]: The number of cached table definitions (e.g. "400")
  • CF_MYSQL_OPEN_FILES_LIMIT [int]: The number of file descriptors available to MariaDB (e.g. "100")
  • CF_MYSQL_SQLMODE [string]: List of options for sql_mode (e.g. "STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO")
  • CF_LANG [string]: Language to use (en_EN.UTF-8 or de_DE.UTF-8)
  • CF_TIMEZONE [string]: Timezone (e.g. 'Europe/Berlin')

Only when the internal data directory doesn't already exist:

  • CF_ENABLE_DB_INIT_DEBUG [bool]: Enable debugging output when DB is initialized?
    Warning: This will print DB user passwords to the log output
  • CF_DB_ROOT_PASSWORD [string]: Password for DB root user (>= 4 chars)
  • to create a new DB schema when a container is started:
    • CF_DB_USER_NAME [string]: Create a DB user with this name
    • CF_DB_USER_PASS [string]: Password for CF_DB_USER_NAME (>= 4 chars)
    • CF_DB_SCHEMA_NAME [string]: Create a DB schema that CF_DB_USER_NAME can access

About

MariaDB DB-Server Docker Image for AARCH64, ARMv7l, X86 and X64

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published