创建配置文件 docker-compose.yml,内容如下:
name: phpmyadmin
services:
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
container_name: phpmyadmin
restart: always
ports:
- 8080:80
environment:
- PMA_ARBITRARY=1
- PMA_PORTS=3306
运行命令启动
docker-compose -f docker-compose.yml up -d
出现下图就是安装成功啦
可以执行 docker ps 检测运行情况
然后访问127.0.0.1:8080 就可以啦