# Dockerfile for phpMyAdmin
# Use the official phpmyadmin image from Docker Hub
FROM phpmyadmin/phpmyadmin:latest
# Expose the default web port
EXPOSE 80
# Set environment variables to configure phpMyAdmin
ENV MYSQL_ROOT_PASSWORD=rootpassword \
MYSQL_USER=admin \
MYSQL_PASSWORD=adminpassword \
MYSQL_HOST=db
# Command to run the phpMyAdmin container
CMD ["apache2-foreground"]
FROM phpmyadmin/phpmyadmin:latest:
phpmyadmin 镜像。EXPOSE 80:
ENV:
CMD ["apache2-foreground"]:
要使用此 Dockerfile 构建并运行 phpMyAdmin 容器,请确保你有一个运行中的 MySQL 或 MariaDB 容器,并将其命名为 db 或者根据实际情况修改 MYSQL_HOST 环境变量。
上一篇:php session id
下一篇:php+mysql动态网站开发
Laravel PHP 深圳智简公司。版权所有©2023-2043 LaravelPHP 粤ICP备2021048745号-3
Laravel 中文站