Last active
October 3, 2022 14:40
-
-
Save sheikhwaqas/493da83e8fb7b0f1a752326079647a2b to your computer and use it in GitHub Desktop.
Docker Compose configuration to run MySQL 5.6 and MySQL 5.7 on one instance. Create /var/lib/mysql56-data & /var/lib/mysql57-data with root as the owner of these directories before running docker-compose up -d
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' | |
services: | |
mysql56: | |
image: mysql:5.6 | |
restart: unless-stopped | |
container_name: mysql56-container | |
ports: | |
- "127.0.0.1:3356:3306" | |
environment: | |
MYSQL_ROOT_PASSWORD: rootPassword | |
volumes: | |
- /var/lib/mysql56-data:/var/lib/mysql | |
mysql57: | |
image: mysql:5.7 | |
restart: unless-stopped | |
container_name: mysql57-container | |
ports: | |
- "127.0.0.1:3357:3306" | |
environment: | |
MYSQL_ROOT_PASSWORD: rootPassword | |
volumes: | |
- /var/lib/mysql57-data:/var/lib/mysql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment