Sign inSign up

govindinfi/mariadb

By govindinfi

•Updated over 3 years ago

MariaDB latest version with schema setup

Image
0

157

govindinfi/mariadb repository overview

⁠MariaDB Latest Version with schema Setup

⁠Please find the required configuration details below for setup MariaDB with the existing database dump.
  • Create a .env file and change the required environment

# DATABASE environment

MARIADB_USER=user
MARIADB_PASSWORD=user@123
MARIADB_ROOT_PASSWORD=root@123
MARIADB_DATABASE=XYZ
MARIADB_SCHEMA=schema.sql
  • Create a docker-compose.yml file and update the required environment.
version: '2.2'
services:
  mariadb:
    image: govindinfi/mariadb:latest
    container_name: mariadb
    restart: on-failure
    env_file: 
      - .env
    volumes:
      - mysqldb:/var/lib/mysql
      - ./mariadb/dump.sql:/docker-entrypoint-initdb.d/schema.sql:ro
    ports:
      - 3306:3306
    networks: 
      - network
    healthcheck:
      test: [ 'CMD', 'mysqladmin', 'ping', '-u', 'root', '-p${MARIADB_ROOT_PASSWORD}' ]
      interval: 1m
      timeout: 10s
      retries: 5
volumes:
  mysqldb:
networks:
  network:
    driver: bridge

Tag summary

Content type

Image

Digest

sha256:0b08226c8…

Size

119.9 MB

Last updated

over 3 years ago

docker pull govindinfi/mariadb