22 lines
504 B
YAML
22 lines
504 B
YAML
version: '3.8'
|
|
services:
|
|
mariadb:
|
|
container_name: mariadb
|
|
image: mariadb:10.11.7
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfiles
|
|
command: --init-file /docker-entrypoint-initdb.d/init.sql
|
|
volumes:
|
|
- data:/var/lib/mysql # named volume
|
|
- ./conf.d:/etc/mysql/conf.d # volume mount
|
|
- ./init.d:/docker-entrypoint-initdb.d
|
|
environment:
|
|
- TZ=Asia/Seoul
|
|
- MARIADB_ROOT_PASSWORD=root
|
|
ports:
|
|
- 3307:3306
|
|
restart: always
|
|
|
|
volumes:
|
|
data: |