Reputation: 21
I have created a docker-compose.yml file with the following parameters:
version: '3'
services:
php:
build: ./docker/images/php
ports:
- 80:80
volumes:
- ./htdocs:/var/www/html
container_name: php
networks:
- default
mysql:
image: mysql:latest
container_name: mysql
environment:
MYSQL_ROOT_PASSWORD: dani
MYSQL_DATABASE: mysql_database
MYSQL_USER: dani
MYSQL_PASSWORD: dani
ports:
- "3306:3306"
volumes:
- ./dbdata:/var/lib/mysql
networks:
- default
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: phpmyadmin
ports:
- 8080:8080
environment:
- PMA_HOST=mysql
networks:
- default
networks:
default:
This is the console output:
But, when I try to go to localhost:8080 :
I can't see phpmyadmin dashboard. What can I do?
Thanks!
Upvotes: 2
Views: 1260
Reputation: 49
you can Try in your image
phpmyadmin:
image: phpmyadmin/phpmyadmin
ports:
- '8080:80'
restart: always
environment:
PMA_HOST: mysql
depends_on:
- mysql
networks:
- mysql_network
Upvotes: 0
Reputation: 473
you have specified the wrong port in the phpmyadmin service, you've to map from 8080 to 80 where the application && try this environement also
Change the port & Env with this one:
ports:
- 8080:80
environment:
- PMA_ARBITRARY=1
Upvotes: 0
Reputation: 224
you can change for image and port by this code:
phpmyadmin:
image: phpmyadmin:latest
container_name: phpmyadmin
restart: always
ports:
- 8080:80
environment:
- PMA_HOST=mysql
networks:
- default
May be just it for your problem, good luck
Upvotes: 4