1 / 7
文档名称:

Docker安装PHP部署指南.docx

格式:docx   大小:107KB   页数:7页
下载后只包含 1 个 DOCX 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

Docker安装PHP部署指南.docx

上传人:科技星球 2022/4/7 文件大小:107 KB

下载得到文件列表

Docker安装PHP部署指南.docx

文档介绍

文档介绍:Docker 安装 PHP
       
 
 
 
 
 
 
 
     
     
     
 
 
 
Docker 安装 PHP
安装 PHP 镜像
方法一、通过 DockerfiPHP_EXTRA_CONFIGURE_ARGS
--disable-cgi
# --enable-mysqlnd is included here because it's harder to compile after the fact than extensions are (since it's a plugin for several extensions, not an extension in itself)
--enable-mysqlnd
# --enable-mbstring is included here because otherwise there's no way to get pecl to use it properly (see -library/php/issues/195)
--enable-mbstring
--with-curl
--with-libedit
--with-openssl
--with-zlib
&& make -j"$(nproc)"
&& make install
&& { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; }
&& make clean
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false $buildDeps
COPY docker-php-ext- /usr/local/bin/
####
WORKDIR /var/www/html
RUN set -ex
&& cd /usr/local/etc
&& if [ -d php- ]; then
# for some reason, upstream's php- has "include=NONE/etc/php-/.conf"
sed 's!=NONE/!=!g' php- | tee php- > /dev/null;
cp php-.default php-;
else
# PHP don't use "include=" by default, so we'll create our own simple config that mimics PHP 7+ for consistency
mkdir php-;
cp php- php