Created
November 2, 2021 14:49
-
-
Save proclaim/f58a8cc0458bf96f3b49e537423e4881 to your computer and use it in GitHub Desktop.
MySQL docker compose file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.1' | |
services: | |
mysql: | |
image: mysql:latest | |
container_name: mysql | |
# this is the maigc for login | |
command: --default-authentication-plugin=mysql_native_password | |
restart: always | |
environment: | |
MYSQL_DATABASE: 'db' | |
MYSQL_USER: 'user' | |
MYSQL_PASSWORD: 'password' | |
MYSQL_ROOT_PASSWORD: 'password' | |
ports: | |
- '3306:3306' | |
expose: | |
- '3306' | |
volumes: | |
- my-db:/var/lib/mysql | |
volumes: | |
my-db: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment