
Step 7 : RUN chown -R nginx:nginx /mcloud/www/ && rm -rf /etc/nginx/conf.d/status.conf && composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/ && cd /mcloud/www/pcs-api && composer install
---> Running in a73905f2bdbc
[91mDo not run Composer as root/super user! See https://getcomposer.org/root for details
[0mThe command '/bin/sh -c chown -R nginx:nginx /mcloud/www/ && rm -rf /etc/nginx/conf.d/status.conf && composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/ && cd /mcloud/www/pcs-api && composer install' returned a non-zero code: 255
Build step 'Docker Build and Publish' marked build as failure
Finished: FAILURE
FROM registry-vpc.cn-beijing.aliyuncs.com/cmc/centos-nginx112-php72:0.1.12
MAINTAINER wangqiang@chinamcloud.com
RUN sed -i 's/open_basedir = .\/:\/mcloud:\/tmp:\/data:\/webtv/;open_basedir = .\/:\/mcloud:\/tmp:\/data:\/webtv:\/usr\/local\/php/g' /usr/local/php/etc/php.ini && \
sed -i 's/allow_url_fopen = Off/allow_url_fopen = On/g' /usr/local/php/etc/php.ini && \
sed -i 's/disable_functions = exec,system,passthru,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open,dl,popen,show/disable_functions = system,shell_exec,escapeshellarg,escapeshellcmd,dl,popen,show/g' /usr/local/php/etc/php.ini
COPY code /mcloud/www/pcs-api
COPY code/build/c_files/ /
RUN chown -R nginx:nginx /mcloud/www/ && \
rm -rf /etc/nginx/conf.d/status.conf && \
chmod +x /usr/local/bin/composer && \
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/ && \
cd /mcloud/www/pcs-api && \
composer install
RUN chown -R nginx:nginx /mcloud/www/ && \
rm -rf /etc/nginx/conf.d/status.conf && \
chmod +x /usr/local/bin/composer && \
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/ && \
cd /mcloud/www/pcs-api
RUN chown -R nginx:nginx /mcloud/www/ && \
rm -rf /etc/nginx/conf.d/status.conf && \
chmod +x /usr/local/bin/composer && \
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/ && \
cd /mcloud/www/pcs-api && \
composer --version && \
composer config --global --list

RUN chown -R nginx:nginx /mcloud/www/ && \
rm -rf /etc/nginx/conf.d/status.conf && \
cd /mcloud/www/pcs-api && \
curl -sS https://getcomposer.org/installer | php && \
php composer.phar install

RUN chown -R nginx:nginx /mcloud/www/ && rm -rf /etc/nginx/conf.d/status.conf && cd /mcloud/www/pcs-api && curl -sS https://getcomposer.org/installer | php && php composer.phar install
---> Running in 28a2ad979c18
All settings correct for using Composer
Warning: is_dir(): open_basedir restriction in effect. File(/root/.composer) is not within the allowed path(s): (./:/sobey:/tmp:/data:/webtv:/var/log:/mcloud) in Standard input code on line 495
Warning: is_dir(): open_basedir restriction in effect. File(/root/.composer) is not within the allowed path(s): (./:/sobey:/tmp:/data:/webtv:/var/log:/mcloud) in Standard input code on line 685
Unable to create Composer home directory "/root/.composer": mkdir(): open_basedir restriction in effect. File(/root/.composer) is not within the allowed path(s): (./:/sobey:/tmp:/data:/webtv:/var/log:/mcloud)
The command '/bin/sh -c chown -R nginx:nginx /mcloud/www/ && rm -rf /etc/nginx/conf.d/status.conf && cd /mcloud/www/pcs-api && curl -sS https://getcomposer.org/installer | php && php composer.phar install' returned a non-zero code: 1
Build step 'Docker Build and Publish' marked build as failure
Finished: FAILURE

FROM registry-vpc.cn-beijing.aliyuncs.com/cmc/centos-nginx112-php72:0.1.12
MAINTAINER wangqiang@chinamcloud.com
RUN sed -i 's/open_basedir = .\/:\/sobey:\/tmp:\/data:\/webtv/;open_basedir = .\/:\/sobey:\/tmp:\/data:\/webtv:\/usr\/local\/php/g' /usr/local/php/etc/php.ini && \
sed -i 's/allow_url_fopen = Off/allow_url_fopen = On/g' /usr/local/php/etc/php.ini && \
sed -i 's/disable_functions = exec,system,passthru,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open,dl,popen,show/disable_functions = system,shell_exec,escapeshellarg,escapeshellcmd,dl,popen,show/g' /usr/local/php/etc/php.ini
COPY code /mcloud/www/pcs-api
COPY code/build/c_files/ /
RUN chown -R nginx:nginx /mcloud/www/ && \
rm -rf /etc/nginx/conf.d/status.conf && \
chmod +x /usr/local/bin/composer && \
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/ && \
cd /mcloud/www/pcs-api && \
composer install

Linux 服务器运维、部署与线上故障排查
如果你的网站或后端服务部署在 Linux 服务器上,遇到访问异常、Nginx 配置问题、MySQL / Redis 异常、Docker 服务不可用、磁盘占满、CPU / 内存过高等问题,可以联系我做一次远程排查。
适合以下场景:
✅ 网站打不开或访问不稳定
✅ Nginx / PHP-FPM 配置异常
✅ MySQL / Redis 性能或连接问题
✅ Docker 服务部署与维护
✅ 服务器迁移与环境配置
✅ CPU / 内存 / 磁盘异常排查
服务内容:
✅ Linux 环境检查
✅ 网站部署与迁移
✅ Nginx / PHP-FPM / MySQL / Redis 排查
✅ Docker 配置与维护
✅ 服务器性能分析
✅ 长期远程运维支持
如需咨询,请联系我,并注明:Linux 运维咨询。
联系方式:
Telegram:@shuijingwan
微信:13980074657
邮箱:shuijingwanwq@gmail.com

发表回复