1 Star 2 Fork 1

inhere/alphp

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
alphp-fpm.Dockerfile 1.76 KB
一键复制 编辑 原始数据 按行查看 历史
inhere 提交于 2018-04-20 20:35 . fix: dockerfile error
# @description php 7.1 image base on the alpine 3.7 镜像更小,构建完成只有46M
# some information
# ------------------------------------------------------------------------------------
# @link https://hub.docker.com/_/alpine/ alpine image
# @link https://hub.docker.com/_/php/ php image
# @link https://github.com/docker-library/php php dockerfiles
# ------------------------------------------------------------------------------------
# @build-example docker build . -f alphp-fpm.Dockerfile -t alphp/alphp:fpm
#
FROM alphp/alphp:cli
LABEL maintainer="inhere <cloud798@126.com>" version="1.0"
##
# ---------- building ----------
##
RUN set -ex \
# change apk source repo
&& sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/' /etc/apk/repositories \
&& apk update \
&& apk add --no-cache \
php7-fpm \
nginx \
&& apk del --purge *-dev \
&& rm -rf /var/cache/apk/* /tmp/* /usr/share/man /usr/share/php7 \
# - config nginx
&& mkdir /run/nginx \
# - config PHP-FPM
&& cd /etc/php7 \
&& { \
echo "[global]"; \
echo "pid = /var/run/php-fpm.pid"; \
echo "[www]"; \
echo "user = www"; \
echo "group = www"; \
} | tee php-fpm.d/custom.conf \
# - config site
&& chown -R www:www /var/www \
&& { \
echo "#!/bin/sh"; \
echo "nginx -g 'daemon on;'"; \
# echo "php /var/www/uem.phar taskServer:start -d"; \
echo "php-fpm7 -F"; \
} | tee /run.sh \
&& chmod 755 /run.sh \
&& echo -e "\033[42;37m Build Completed :).\033[0m\n"
EXPOSE 9501 80
VOLUME ["/var/www", "/data"]
WORKDIR "/var/www"
CMD /run.sh
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/inhere/alphp.git
git@gitee.com:inhere/alphp.git
inhere
alphp
alphp
master

搜索帮助