Last active
January 8, 2025 23:14
-
-
Save nicoavila/fd4725428bd2991bb9237b3c7d770e76 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
Added this to build on macOS: