Q&A
Q1: 构建php-fpm失败 错误信息如下
Step 8/179 : RUN if [ ${CHANGE_SOURCE} = true ]; then sed -i 's/deb.debian.org/mirrors.aliyun.com/' /etc/apt/sources.list && sed -i 's/security.debian.org/mirrors.aliyun.com/' /etc/apt/sources.list && sed -i 's/security-cdn.debian.org/mirrors.aliyun.com/' /etc/apt/sources.list ;fi
---> Running in da1dfe176232
Removing intermediate container da1dfe176232
---> 02d393dc19d7
Step 9/179 : RUN set -xe; apt-get update -yqq && pecl channel-update pecl.php.net && apt-get install -yqq apt-utils gnupg2 git libzip-dev zip unzip && if [ ${LARADOCK_PHP_VERSION} = "7.3" ] || [ ${LARADOCK_PHP_VERSION} = "7.4" ] || [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then docker-php-ext-configure zip; else docker-php-ext-configure zip --with-libzip; fi && docker-php-ext-install zip && php -m | grep -q 'zip'
---> Running in 5319396d9e47
+ apt-get update -yqq
E: Release file for http://deb.debian.org/debian/dists/buster-updates/InRelease is not valid yet (invalid for another 3d 8h 52min 40s). Updates for this repository will not be applied.
E: Release file for http://security.debian.org/debian-security/dists/buster/updates/InRelease is not valid yet (invalid for another 2d 6h 35min 29s). Updates for this repository will not be applied.
The command '/bin/sh -c set -xe; apt-get update -yqq && pecl channel-update pecl.php.net && apt-get install -yqq apt-utils gnupg2 git libzip-dev zip unzip && if [ ${LARADOCK_PHP_VERSION} = "7.3" ] || [ ${LARADOCK_PHP_VERSION} = "7.4" ] || [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then docker-php-ext-configure zip; else docker-php-ext-configure zip --with-libzip; fi && docker-php-ext-install zip && php -m | grep -q 'zip'' returned a non-zero code: 100
ERROR: Service 'php-fpm' failed to build : Build failed
A1: 处理
错误提示的是: 文件无效
原因: 构建环境是在vbox-centos虚拟机上的、由于系统的时间不准确导致
确认当前系统时区: timedatectl status|grep 'Time zone'
确认当前系统时间: date
安装同步系统时间工具: yum -y install ntpdate
同步当前系统时间: ntpdate -u pool.ntp.org