Quantcast
Channel: Active questions tagged dockerfile - DevOps Stack Exchange
Viewing all articles
Browse latest Browse all 136

Cannot execute two phpmyadmin instances in different containers

$
0
0

I trying to run multiple instances of phpmyadmin and MySQL. So I have actually 2 docker-compose.yml files, which contains this

  database:    container_name: boilerplate_db    restart: always    build:      context: ./docker/database    environment:      - MYSQL_DATABASE=${DB_NAME}      - MYSQL_USER=${DB_USER}      - MYSQL_PASSWORD=${DB_PWD}      - MYSQL_ROOT_PASSWORD=${DB_PWD_ROOT}    volumes:      - ./docker/database/data.sql:/docker-entrypoint-initdb.d/data.sql  phpmyadmin:    container_name: boilerplate_phpmyadmin    image: phpmyadmin/phpmyadmin    restart: always    ports:      - 8089:80    environment:      - PMA_HOST=database      - MYSQL_USER=${DB_USER}      - MYSQL_PASSWORD=${DB_PWD}      - MYSQL_ROOT_PASSWORD=${DB_PWD_ROOT}    depends_on:      - database

this is the Dockerfile:

FROM mariadb:latestCMD ["mysqld"]EXPOSE 3306

Inside each folder I have different .env variables. In the first folder I've executed: docker-compose up —build -d and everything has worked, I can correctly access to the database using phpmyadmin.

So I did the same to second docker-compose.yml but for some reason I get this error:

(HY000/1045): Access denied

which is weird.

The only different between the two phpmyadmin is the port, the first one run on the port 8088 and the second on 8089. What I did wrong?

NB: This happen only on the second phpmyadmin container which runs over the 8089 port. Seems like a conflict?


Viewing all articles
Browse latest Browse all 136

Trending Articles