Docker Compose File (Apache+PHP+MariaDB+phpMyAdmin)
備份一下在自己電腦測試網頁用的Docker Compose
(Apache2 + PHP 7.2 + MariaDB 10 + phpMyAdmin)
version: '3.1' services: mariadb: container_name: mariadb10 image: mariadb restart: unless-stopped ports: - 3006:3006 environment: - MYSQL_ALLOW_EMPTY_PASSWORD=1 volumes: - /Users/AndyWu/Documents/Docker/mysql:/var/lib/mysql networks: my_network: ipv4_address: "192.168.250.2" apache2: container_name: apache2 image: mobingi/ubuntu-apache2-php7:7.2 restart: unless-stopped ports: - 80:80 volumes: - /Users/AndyWu/Documents/Docker/apache2+php7.2:/var/www/html networks: my_network: ipv4_address: "192.168.250.3" depends_on: - mariadb phpmyadmin: container_name: phpmyadmin image: phpmyadmin/phpmyadmin restart: unless-stopped ports: - 81:80 environment: - PMA_ARBITRARY=1 - PMA_HOST=192.168.250.2 - PMA_PORTS=3006 networks: my_network: ipv4_address: "192.168.250.4" depends_on: - mariadb networks: my_network: driver: bridge ipam: config: - subnet: "192.168.250.0/24"
近期迴響