Skip to content

Instantly share code, notes, and snippets.

@hteen
Created September 17, 2019 09:21
Show Gist options
  • Select an option

  • Save hteen/aaab7f1487874d6f27ac862be4c2917f to your computer and use it in GitHub Desktop.

Select an option

Save hteen/aaab7f1487874d6f27ac862be4c2917f to your computer and use it in GitHub Desktop.
php容器中curl Nginx本地域名
version: '3'
services:
php:
image: hteen/php
restart: always
privileged: true
extra_hosts:
- "a.com:172.19.0.10"
volumes:
- ./php/php.ini:/usr/local/etc/php/php.ini
- ./www/:/www
nginx:
image: nginx
restart: always
privileged: true
depends_on:
- php
ports:
- "80:80"
volumes:
- ./nginx/log:/data/nginx/log
- ./nginx/etc:/etc/nginx
- ./www/:/www
networks:
default:
ipv4_address: 172.19.0.10
networks:
default:
driver: bridge
ipam:
config:
- subnet: 172.19.0.0/16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment