Skip to content

Instantly share code, notes, and snippets.

@userbradley
Created January 28, 2022 13:59
Show Gist options
  • Save userbradley/690341f7b881c2c7dc5d1fc22298e918 to your computer and use it in GitHub Desktop.
Save userbradley/690341f7b881c2c7dc5d1fc22298e918 to your computer and use it in GitHub Desktop.
mariadb in docker
mariadb:
image: mariadb:latest
restart: always
hostname: "mariadb"
command: "mysqld --init-file /data/application/init.sql"
volumes:
- mariadb-data:/var/lib/mysql
- ./init.sql:/data/application/init.sql
ports:
- '3306:3306'
environment:
MYSQL_ROOT_PASSWORD: password1
volumes:
mariadb-data:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment