Skip to content

Instantly share code, notes, and snippets.

@FilipBartos
Created May 1, 2022 13:22
Show Gist options
  • Save FilipBartos/3db6d921325f72fcb452a185da367cbe to your computer and use it in GitHub Desktop.
Save FilipBartos/3db6d921325f72fcb452a185da367cbe to your computer and use it in GitHub Desktop.
MySQL with phpMyAdmin in Docker
version: '3'
services:
mysql:
image: mysql:8.0
container_name: mysql
environment:
MYSQL_ROOT_PASSWORD: root-password
MYSQL_DATABASE: database
MYSQL_USER: user
MYSQL_PASSWORD: password
ports:
- "6033:3306"
volumes:
- dbdata:/var/lib/mysql
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: phpmyadmin
links:
- mysql
environment:
PMA_HOST: mysql
PMA_PORT: 3306
PMA_ARBITRARY: 1
restart: always
ports:
- 8081:80
volumes:
dbdata:
@FilipBartos
Copy link
Author

http://localhost:8081

server: mysql
user: user
password: password

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment