Sign inSign up

dreamplay/php_nginx

By dreamplay

•Updated almost 7 years ago

搭载php、nginx、supervisor环境的基础镜像

Image
0

162

dreamplay/php_nginx repository overview

使用Dockerfile构建

FROM dreamplay/php_nginx

MAINTAINER LinZhou "[email protected]"

#开机自启程序
COPY ./config/rc.local /etc/rc.d/rc.local
RUN chmod 0755 /etc/rc.d/rc.local
# nginx配置
COPY ./config/nginx/nginx.conf /usr/local/nginx/conf/nginx.conf
COPY ./config/nginx/vhost /usr/local/nginx/conf/vhost
# php配置
COPY ./config/php/php-fpm.conf /usr/local/php/etc/php-fpm.conf
# supervisor配置
COPY ./config/supervisor/supervisord.d /etc/supervisord.d
COPY ./config/supervisor/supervisord.conf /etc/supervisord.conf

使用docker-compose启动

version: "2"
services:
  redis:
    image: redis
    restart: always
    expose:
      - 6379
    volumes:
      - ./runtime/redis/data:/data
  mongo:
    image: bitnami/mongodb
    restart: always
    privileged: true
    user: root
    expose:
      - 27017
    volumes:
      - /etc/localtime:/etc/localtime
      - ./runtime/mongo/data:/bitnami
  php_nginx:
    build: .
    restart: always
    privileged: true
    command: /usr/sbin/init
    ports:
      - 8888:80
      - 9002:9001
    volumes:
      - ./runtime/nginx/wwwlogs:/home/wwwlogs
      - ./code:/home/wwwroot/api/common_log

Tag summary

Content type

Image

Digest

Size

290.8 MB

Last updated

almost 7 years ago

docker pull dreamplay/php_nginx