Portal:Container/Image/mariadb

Jump to: navigation, search

openSUSE MariaDB Container Image

Description

This container image contains the latest mariadb database daemon from openSUSE Tumbleweed.

Location

  • registry.opensuse.org/opensuse/mariadb

Configuration

This container image requires a local data directory, by default /srv/mariadb. During the first start a new database will be created if none exists already.

Supported environment variables:

  • MYSQL_ROOT_PASSWORD - needs to contain the root password for the database
  • MYSQL_ALLOW_EMPTY_PASSWORD - Allow empty root password
  • MYSQL_RANDOM_ROOT_PASSWORD - Set a random password with pwgen generated
  • MYSQL_INITDB_SKIP_TZINFO
  • MYSQL_ROOT_HOST
  • MYSQL_DATABASE
  • MYSQL_USER
  • MYSQL_PASSWORD

Run

 # podman run -d --rm -v /srv/mariadb:/var/lib/mysql --name mariadb --env MYSQL_ROOT_PASSWORD=pass --env MYSQL_USER=user --env MYSQL_PASSWORD=pass --env MYSQL_DATABASE=db -p 3306:3306 registry.opensuse.org/devel/kubic/containers/container/opensuse/mariadb

Systemd support

The package containers-systemd contains a service file and sysconfig file to configure and automatically start the mariadb container with systemd.

 # systemctl start container-mariadb