Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
305 views
in Technique[技术] by (71.8m points)

Cannot access phpMyAdmin Web on Docker Dekstop WSL2

I create Docker container for MariaDB database and phpMyAdmin. When i run the container use Docker Compose i cannot access the phpMyAdmin web on http://localhost:8080

Here is my docker-compose.yml

version: '3.8'
services:
  database:
    container_name: database
    image: mariadb:10.5.8-focal
    restart: always
    ports:
    - 3307:3306
    environment:
      MYSQL_ROOT_PASSWORD: secret
    volumes:
      - ./data:/var/lib/mysql
      - ./entrypoint:/docker-entrypoint-initdb.d
    networks:
      - db-network

  phpmyadmin:
    container_name: phpmyadmin
    image: phpmyadmin:5.0.4-fpm-alpine
    restart: always
    ports:
    - 8080:80
    environment:
      PMA_HOST: database
      PMA_USER: root
      PMA_PASSWORD: secret
    depends_on:
      - database
    networks:
      - db-network

networks:
  db-network:
    name: db-network
question from:https://stackoverflow.com/questions/65867015/cannot-access-phpmyadmin-web-on-docker-dekstop-wsl2

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...