1.安装
git clone https://github.com/gnulife/dphp.git
cd dphp && docker-compose build && docker-compose up -d
2.解决bug
1)
eg:
ERROR: unsatisfiable constraints:
php7-redis-4.0.2-r0:
masked in: @community
satisfies: world[php7-redis]
ERROR: Service 'phpfpm7' failed to build: The command '/bin/sh -c apk add php7@community
cd alpine
# 换为国内镜像,以加速docker image制作速度,非中国镜内用户请注释掉下一行
RUN echo 'http://mirrors.aliyun.com/alpine/v3.6/main/' > /etc/apk/repositories
RUN echo '@community http://mirrors.aliyun.com/alpine/v3.6/community/' >> /etc/apk/repositories
RUN echo '@testing http://mirrors.aliyun.com/alpine/edge/testing/' >> /etc/apk/repositories
RUN echo '@latest http://mirrors.aliyun.com/alpine/edge/main/' >> /etc/apk/repositories
2)
eg:
ln: /usr/bin/php: File exists
cd phpfpm7
php7-redis@testing 换成 php7-redis@community
RUN unlink /usr/bin/php
RUN ln -s /usr/bin/php7 /usr/bin/php