

本地启动没问题

yaml文件:
kind: Deployment
apiVersion: apps/v1
metadata:
name: gfb-php-v1
namespace: v1
labels:
app: gfb-php
version: v1
annotations:
deployment.kubernetes.io/revision: ‘1’
kubesphere.io/creator: admin
spec:
replicas: 4
selector:
matchLabels:
app: gfb-php
version: v1
template:
metadata:
creationTimestamp: null
labels:
app: gfb-php
version: v1
spec:
volumes:
- name: host-time
hostPath:
path: /etc/localtime
type: ''
containers:
- name: container-44zoog
image: ‘harbor.intra.gufeibao.com/gfb/php:v1’
ports:
- name: http
containerPort: 9000
protocol: TCP
resources: {}
volumeMounts:
- name: host-time
readOnly: true
mountPath: /etc/localtime
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: IfNotPresent
restartPolicy: Always
terminationGracePeriodSeconds: 30
dnsPolicy: ClusterFirst
serviceAccountName: default
serviceAccount: default
securityContext: {}
imagePullSecrets:
- name: gfb-docker
affinity: {}
schedulerName: default-scheduler
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 25%
maxSurge: 25%
revisionHistoryLimit: 10
progressDeadlineSeconds: 600
dockerfile:
[root@kubesphere003 ~]# docker history harbor.intra.gufeibao.com/gfb/php:v1 –format “{{.CreatedBy}}” –no-trunc |tac | awk ‘{if($3~/nop/){for(i=1;i<=3;i++){$i=""};print substr($0,4)}else{print “RUN”,$0}}’
ADD file:19d7ba0fceddd7fc78b5fb96cf8110e5d10e0e5d2554030dfe640d161379cb79 in /
CMD [“bash”]
RUN /bin/sh -c set -eux; { echo ‘Package: php*’; echo ‘Pin: release ’; echo ‘Pin-Priority: -1’; } > /etc/apt/preferences.d/no-debian-php
ENV PHPIZE_DEPS=autoconf dpkg-dev file g++ gcc libc-dev make pkg-config re2c
RUN /bin/sh -c set -eux; apt-get update; apt-get install -y –no-install-recommends $PHPIZE_DEPS ca-certificates curl xz-utils ; rm -rf /var/lib/apt/lists/
ENV PHP_INI_DIR=/usr/local/etc/php
RUN /bin/sh -c set -eux; mkdir -p “$PHP_INI_DIR/conf.d”; [ ! -d /var/www/html ]; mkdir -p /var/www/html; chown www-data:www-data /var/www/html; chmod 777 /var/www/html
ENV PHP_EXTRA_CONFIGURE_ARGS=–enable-embed
ENV PHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
ENV PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
ENV PHP_LDFLAGS=-Wl,-O1 -pie
ENV GPG_KEYS=42670A7FE4D0441C8E4632349E4FDC074A4EF02D 5A52880781F755608BF815FC910DEB46F53EA312
ENV PHP_VERSION=7.4.23
ENV PHP_URL=https://www.php.net/distributions/php-7.4.23.tar.xz PHP_ASC_URL=https://www.php.net/distributions/php-7.4.23.tar.xz.asc
ENV PHP_SHA256=cea52313fcffe56343bcd3c66dbb23cd5507dc559cc2e3547cf8f5452e88a05d
RUN /bin/sh -c set -eux; savedAptMark=“$(apt-mark showmanual)”; apt-get update; apt-get install -y –no-install-recommends gnupg dirmngr; rm -rf /var/lib/apt/lists/*; mkdir -p /usr/src; cd /usr/src;curl -fsSL -o php.tar.xz “$PHP_URL”; if [ -n “$PHP_SHA256” ]; then echo “$PHP_SHA256 php.tar.xz” | sha256sum -c -; fi; if [ -n “$PHP_ASC_URL” ]; then curl -fsSL -o php.tar.xz.asc “$PHP_ASC_URL”; export GNUPGHOME=“$(mktemp -d)”; for key in $GPG_KEYS; do gpg –batch –keyserver keyserver.ubuntu.com –recv-keys “$key”; done; gpg –batch –verify php.tar.xz.asc php.tar.xz; gpgconf –kill all; rm -rf “$GNUPGHOME”; fi; apt-mark auto ‘.’ > /dev/null; apt-mark manual $savedAptMark > /dev/null; apt-get purge -y –auto-remove -o APT::AutoRemove::RecommendsImportant=false
COPY file:ce57c04b70896f77cc11eb2766417d8a1240fcffe5bba92179ec78c458844110 in /usr/local/bin/
RUN /bin/sh -c set -eux; savedAptMark=“$(apt-mark showmanual)”; apt-get update; apt-get install -y –no-install-recommends ${PHP_EXTRA_BUILD_DEPS:-} libargon2-dev libcurl4-openssl-dev libonig-dev libreadline-dev libsodium-dev libsqlite3-dev libssl-dev libxml2-dev zlib1g-dev ; export CFLAGS=“$PHP_CFLAGS” CPPFLAGS=“$PHP_CPPFLAGS” LDFLAGS=“$PHP_LDFLAGS” ; docker-php-source extract;cd /usr/src/php; gnuArch=“$(dpkg-architecture –query DEB_BUILD_GNU_TYPE)”; debMultiarch=“$(dpkg-architecture –query DEB_BUILD_MULTIARCH)”; if [ ! -d /usr/include/curl ]; then ln -sT “/usr/include/$debMultiarch/curl” /usr/local/include/curl; fi; ./configure –build=“$gnuArch” –with-config-file-path=“$PHP_INI_DIR” –with-config-file-scan-dir=“$PHP_INI_DIR/conf.d” –enable-option-checking=fatal –with-mhash –with-pic –enable-ftp –enable-mbstring –enable-mysqlnd –with-password-argon2 –with-sodium=shared –with-pdo-sqlite=/usr –with-sqlite3=/usr –with-curl –with-openssl –with-readline –with-zlib –with-pear $(test “$gnuArch” = ‘s390x-linux-gnu’ && echo ‘–without-pcre-jit’) –with-libdir=“lib/$debMultiarch” ${PHP_EXTRA_CONFIGURE_ARGS:-} ; make -j “$(nproc)”; find -type f -name ‘.a’ -delete; make install; find /usr/local/bin /usr/local/sbin -type f -perm +0111 -exec strip –strip-all ‘{}’ + true; make clean; cp -v php.ini- “$PHP_INI_DIR/”; cd/; docker-php-source delete; apt-mark auto ‘.’ > /dev/null; [ -z “$savedAptMark” ] || apt-mark manual $savedAptMark; find /usr/local -type f -executable -exec ldd ‘{}’ ‘;’ | awk ‘/=>/ { print $(NF-1) }’ | sort -u | xargs -r dpkg-query –search | cut -d: -f1 | sort -u | xargs -r apt-mark manual ; apt-get purge -y –auto-remove -o APT::AutoRemove::RecommendsImportant=false; rm -rf /var/lib/apt/lists/; pecl update-channels; rm -rf /tmp/pear ~/.pearrc; php –version
COPY multi:efd917b98407edb5d558edb0edbd8e63c9318f701892aaa449794d019a092f37 in /usr/local/bin/
RUN /bin/sh -c docker-php-ext-enable sodium
ENTRYPOINT [“docker-php-entrypoint”]
CMD [“php” “-a”]
RUN php -a