Skip to content

Instantly share code, notes, and snippets.

@lebowvsky
Created June 5, 2023 20:04
Show Gist options
  • Save lebowvsky/75615d5159d970021888d2cf7987d584 to your computer and use it in GitHub Desktop.
Save lebowvsky/75615d5159d970021888d2cf7987d584 to your computer and use it in GitHub Desktop.
docker-compose to create container with mariadb and phpmyadmin
version: '3'
volumes:
mariadb:
driver: local
networks:
db:
driver: bridge
services:
mariadb:
image: mariadb
restart: always
environment:
MARIADB_ROOT_PASSWORD: root
MARIADB_MYSQL_LOCALHOST_USER: root
MARIADB_USER: root
expose:
- "8889"
ports:
- "8889:3306"
volumes:
- mariadb:/var/lib/mysql
networks:
db:
phpmyadmin:
image: phpmyadmin
restart: always
expose:
- "8888"
ports:
- "8888:80"
environment:
- PMA_HOST=mariadb
- PMA_PORT=3306
networks:
db:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment