-
-
Save GuoyiZhang/0da91182084c4b72cd3c60e1b2d16a83 to your computer and use it in GitHub Desktop.
Docker Compose file for a MySQL 5.7 container
This file contains 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.3' | |
services: | |
database: | |
image: mysql:5.7 | |
container_name: mysql | |
restart: always | |
environment: | |
MYSQL_DATABASE: 'db' | |
MYSQL_USER: 'user' | |
MYSQL_PASSWORD: 'password' | |
MYSQL_ROOT_PASSWORD: 'password' | |
ports: | |
- '3306:3306' | |
expose: | |
- '3306' | |
volumes: | |
- './.mysql-data/db:/var/lib/mysql' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment