Php: docker-php-source: Permission Denied

Created on 3 Jan 2020  路  2Comments  路  Source: docker-library/php

I've looked around for support answers. The best I've found was suggestions that this was a file formatting issue but that has not resolved the issue. Here is my docker-compose file:

#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#

FROM debian:buster-slim

# prevent Debian's PHP packages from being installed
# https://github.com/docker-library/php/pull/542
RUN set -eux; \
    { \
        echo 'Package: php*'; \
        echo 'Pin: release *'; \
        echo 'Pin-Priority: -1'; \
    } > /etc/apt/preferences.d/no-debian-php

# dependencies required for running "phpize"
# (see persistent deps below)
ENV PHPIZE_DEPS \
        autoconf \
        dpkg-dev \
        file \
        g++ \
        gcc \
        libc-dev \
        make \
        pkg-config \
        re2c

# persistent / runtime deps
RUN 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 set -eux; \
    mkdir -p "$PHP_INI_DIR/conf.d"; \
# allow running as an arbitrary user (https://github.com/docker-library/php/issues/743)
    [ ! -d /var/www/html ]; \
    mkdir -p /var/www/html; \
    chown www-data:www-data /var/www/html; \
    chmod 777 /var/www/html

##<autogenerated>##
ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi
##</autogenerated>##

# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
# Enable optimization (-O2)
# Enable linker optimization (this sorts the hash buckets to improve cache locality, and is non-default)
# Adds GNU HASH segments to generated executables (this is used if present, and is much faster than sysv hash; in this configuration, sysv hash is also generated)
# https://github.com/docker-library/php/issues/272
# -D_LARGEFILE_SOURCE and -D_FILE_OFFSET_BITS=64 (https://www.php.net/manual/en/intro.filesystem.php)
ENV PHP_CFLAGS="-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
ENV PHP_CPPFLAGS="$PHP_CFLAGS"
ENV PHP_LDFLAGS="-Wl,-O1 -Wl,--hash-style=both -pie"

ENV GPG_KEYS 42670A7FE4D0441C8E4632349E4FDC074A4EF02D 5A52880781F755608BF815FC910DEB46F53EA312

ENV PHP_VERSION 7.4.1
ENV PHP_URL="https://www.php.net/get/php-7.4.1.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-7.4.1.tar.xz.asc/from/this/mirror"
ENV PHP_SHA256="561bb866bdd509094be00f4ece7c3543ec971c4d878645ee81437e291cffc762" PHP_MD5=""

RUN 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_MD5" ]; then \
        echo "$PHP_MD5 *php.tar.xz" | md5sum -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 ha.pool.sks-keyservers.net --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 docker-php-source /usr/local/bin/

RUN set -eux; \
    \
    savedAptMark="$(apt-mark showmanual)"; \
    apt-get update; \
    apt-get install -y --no-install-recommends \
        libargon2-dev \
        libcurl4-openssl-dev \
        libedit-dev \
        libonig-dev \
        libsodium-dev \
        libsqlite3-dev \
        libssl-dev \
        libxml2-dev \
        zlib1g-dev \
        ${PHP_EXTRA_BUILD_DEPS:-} \
    ; \
    rm -rf /var/lib/apt/lists/*; \
    \
    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)"; \
# https://bugs.php.net/bug.php?id=74125
    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" \
        \
# make sure invalid --configure-flags are fatal errors intead of just warnings
        --enable-option-checking=fatal \
        \
# https://github.com/docker-library/php/issues/439
        --with-mhash \
        \
# --enable-ftp is included here because ftp_ssl_connect() needs ftp to be compiled statically (see https://github.com/docker-library/php/issues/236)
        --enable-ftp \
# --enable-mbstring is included here because otherwise there's no way to get pecl to use it properly (see https://github.com/docker-library/php/issues/195)
        --enable-mbstring \
# --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 \
# https://wiki.php.net/rfc/argon2_password_hash (7.2+)
        --with-password-argon2 \
# https://wiki.php.net/rfc/libsodium
        --with-sodium=shared \
# always build against system sqlite3 (https://github.com/php/php-src/commit/6083a387a81dbbd66d6316a3a12a63f06d5f7109)
        --with-pdo-sqlite=/usr \
        --with-sqlite3=/usr \
        \
        --with-curl \
        --with-libedit \
        --with-openssl \
        --with-zlib \
        \
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear") and will be removed in PHP 8+; see also https://github.com/docker-library/php/issues/846#issuecomment-505638494
        --with-pear \
        \
# bundled pcre does not support JIT on s390x
# https://manpages.debian.org/stretch/libpcre3-dev/pcrejit.3.en.html#AVAILABILITY_OF_JIT_SUPPORT
        $(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 -executable -exec strip --strip-all '{}' + || true; \
    make clean; \
    \
# https://github.com/docker-library/php/issues/692 (copy default example "php.ini" files somewhere easily discoverable)
    cp -v php.ini-* "$PHP_INI_DIR/"; \
    \
    cd /; \
    docker-php-source delete; \
    \
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
    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; \
    \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
    pecl update-channels; \
    rm -rf /tmp/pear ~/.pearrc; \
# smoke test
    php --version

COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/

# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598)
RUN docker-php-ext-enable sodium

ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
WORKDIR /var/www/html

RUN set -eux; \
    cd /usr/local/etc; \
    if [ -d php-fpm.d ]; then \
        # for some reason, upstream's php-fpm.conf.default has "include=NONE/etc/php-fpm.d/*.conf"
        sed 's!=NONE/!=!g' php-fpm.conf.default | tee php-fpm.conf > /dev/null; \
        cp php-fpm.d/www.conf.default php-fpm.d/www.conf; \
    else \
        # PHP 5.x doesn't use "include=" by default, so we'll create our own simple config that mimics PHP 7+ for consistency
        mkdir php-fpm.d; \
        cp php-fpm.conf.default php-fpm.d/www.conf; \
        { \
            echo '[global]'; \
            echo 'include=etc/php-fpm.d/*.conf'; \
        } | tee php-fpm.conf; \
    fi; \
    { \
        echo '[global]'; \
        echo 'error_log = /proc/self/fd/2'; \
        echo; echo '; https://github.com/docker-library/php/pull/725#issuecomment-443540114'; echo 'log_limit = 8192'; \
        echo; \
        echo '[www]'; \
        echo '; if we send this to /proc/self/fd/1, it never appears'; \
        echo 'access.log = /proc/self/fd/2'; \
        echo; \
        echo 'clear_env = no'; \
        echo; \
        echo '; Ensure worker stdout and stderr are sent to the main error log.'; \
        echo 'catch_workers_output = yes'; \
        echo 'decorate_workers_output = no'; \
    } | tee php-fpm.d/docker.conf; \
    { \
        echo '[global]'; \
        echo 'daemonize = no'; \
        echo; \
        echo '[www]'; \
        echo 'listen = 9000'; \
    } | tee php-fpm.d/zz-docker.conf

# Override stop signal to stop process gracefully
# https://github.com/php/php-src/blob/17baa87faddc2550def3ae7314236826bc1b1398/sapi/fpm/php-fpm.8.in#L163
STOPSIGNAL SIGQUIT

EXPOSE 9000
CMD ["php-fpm"]
##</autogenerated>##

This is downloaded directly from this site. I've recreated all the files that are in this same folder into my project. But when I try to start the container, I get a permission denied error. Here is the log file:

Building phpfpm
Step 1/25 : FROM debian:buster-slim
 ---> e1af56d072b8
Step 2/25 : RUN set -eux;   {       echo 'Package: php*';       echo 'Pin: release *';      echo 'Pin-Priority: -1';    } > /etc/apt/preferences.d/no-debian-php
 ---> Using cache
 ---> 86417fbd3ec6
Step 3/25 : ENV PHPIZE_DEPS         autoconf        dpkg-dev        file        g++         gcc         libc-dev        make        pkg-config      re2c
 ---> Using cache
 ---> d4534ad145f0
Step 4/25 : RUN 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/*
 ---> Using cache
 ---> 1f1a4266eae5
Step 5/25 : ENV PHP_INI_DIR /usr/local/etc/php
 ---> Using cache
 ---> 8504327c0bc3
Step 6/25 : RUN 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
 ---> Using cache
 ---> 9b712aa494e1
Step 7/25 : ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi
 ---> Using cache
 ---> 62bd330ccb0f
Step 8/25 : ENV PHP_CFLAGS="-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
 ---> Using cache
 ---> 7e7b4906df87
Step 9/25 : ENV PHP_CPPFLAGS="$PHP_CFLAGS"
 ---> Using cache
 ---> 6eb2e9277c4e
Step 10/25 : ENV PHP_LDFLAGS="-Wl,-O1 -Wl,--hash-style=both -pie"
 ---> Using cache
 ---> 1db9259892de
Step 11/25 : ENV GPG_KEYS 42670A7FE4D0441C8E4632349E4FDC074A4EF02D 5A52880781F755608BF815FC910DEB46F53EA312
 ---> Using cache
 ---> 4c20672026fd
Step 12/25 : ENV PHP_VERSION 7.4.1
 ---> Using cache
 ---> 3e7893cc2271
Step 13/25 : ENV PHP_URL="https://www.php.net/get/php-7.4.1.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-7.4.1.tar.xz.asc/from/this/mirror"
 ---> Using cache
 ---> 9fedc47a688b
Step 14/25 : ENV PHP_SHA256="561bb866bdd509094be00f4ece7c3543ec971c4d878645ee81437e291cffc762" PHP_MD5=""
 ---> Using cache
 ---> bcd03ac79854
Step 15/25 : RUN 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_MD5" ]; then      echo "$PHP_MD5 *php.tar.xz" | md5sum -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 ha.pool.sks-keyservers.net --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
 ---> Using cache
 ---> b77668433a77
Step 16/25 : COPY docker-php-source /usr/local/bin/
 ---> Using cache
 ---> 3ff6b4c92b37
Step 17/25 : RUN set -eux;      savedAptMark="$(apt-mark showmanual)";  apt-get update;     apt-get install -y --no-install-recommends      libargon2-dev       libcurl4-openssl-dev        libedit-dev         libonig-dev         libsodium-dev       libsqlite3-dev      libssl-dev      libxml2-dev         zlib1g-dev      ${PHP_EXTRA_BUILD_DEPS:-}   ;   rm -rf /var/lib/apt/lists/*;        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                --enable-ftp        --enable-mbstring       --enable-mysqlnd        --with-password-argon2  --with-sodium=shared        --with-pdo-sqlite=/usr      --with-sqlite3=/usr                 --with-curl         --with-libedit      --with-openssl      --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 -executable -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;       pecl update-channels;   rm -rf /tmp/pear ~/.pearrc;     php --version
 ---> Running in 922b7244b3b9
+ apt-mark showmanual
+ savedAptMark=autoconf
ca-certificates
curl
dpkg-dev
file
g++
gcc
libc6-dev
make
pkg-config
re2c
xz-utils
+ apt-get update
Get:1 http://deb.debian.org/debian buster InRelease [122 kB]
Get:2 http://deb.debian.org/debian buster-updates InRelease [49.3 kB]
Get:3 http://security-cdn.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:4 http://deb.debian.org/debian buster/main amd64 Packages [7908 kB]
Get:5 http://deb.debian.org/debian buster-updates/main amd64 Packages [5792 B]
Get:6 http://security-cdn.debian.org/debian-security buster/updates/main amd64 Packages [167 kB]
Fetched 8317 kB in 3s (3306 kB/s)
Reading package lists...
+ apt-get install -y --no-install-recommends libargon2-dev libcurl4-openssl-dev libedit-dev libonig-dev libsodium-dev libsqlite3-dev libssl-dev libxml2-dev zlib1g-dev
Reading package lists...
Building dependency tree...
Reading state information...
The following package was automatically installed and is no longer required:
  lsb-base
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
  icu-devtools libargon2-1 libbsd-dev libbsd0 libedit2 libicu-dev libicu63
  libncurses-dev libncurses6 libonig5 libsodium23 libsqlite3-0 libxml2
Suggested packages:
  libcurl4-doc libidn11-dev libkrb5-dev libldap2-dev librtmp-dev libssh2-1-dev
  icu-doc ncurses-doc sqlite3-doc libssl-doc
Recommended packages:
  libgpm2
The following NEW packages will be installed:
  icu-devtools libargon2-1 libargon2-dev libbsd-dev libbsd0
  libcurl4-openssl-dev libedit-dev libedit2 libicu-dev libicu63 libncurses-dev
  libncurses6 libonig-dev libonig5 libsodium-dev libsodium23 libsqlite3-0
  libsqlite3-dev libssl-dev libxml2 libxml2-dev zlib1g-dev
0 upgraded, 22 newly installed, 0 to remove and 0 not upgraded.
Need to get 24.6 MB of archives.
After this operation, 101 MB of additional disk space will be used.
Get:1 http://deb.debian.org/debian buster/main amd64 libicu63 amd64 63.1-6 [8292 kB]
Get:2 http://deb.debian.org/debian buster/main amd64 icu-devtools amd64 63.1-6 [188 kB]
Get:3 http://deb.debian.org/debian buster/main amd64 libargon2-1 amd64 0~20171227-0.2 [19.6 kB]
Get:4 http://deb.debian.org/debian buster/main amd64 libargon2-dev amd64 0~20171227-0.2 [24.4 kB]
Get:5 http://deb.debian.org/debian buster/main amd64 libbsd0 amd64 0.9.1-2 [99.5 kB]
Get:6 http://deb.debian.org/debian buster/main amd64 libbsd-dev amd64 0.9.1-2 [219 kB]
Get:7 http://deb.debian.org/debian buster/main amd64 libcurl4-openssl-dev amd64 7.64.0-4 [419 kB]
Get:8 http://deb.debian.org/debian buster/main amd64 libedit2 amd64 3.1-20181209-1 [94.0 kB]
Get:9 http://deb.debian.org/debian buster/main amd64 libncurses6 amd64 6.1+20181013-2+deb10u2 [102 kB]
Get:10 http://deb.debian.org/debian buster/main amd64 libncurses-dev amd64 6.1+20181013-2+deb10u2 [333 kB]
Get:11 http://deb.debian.org/debian buster/main amd64 libedit-dev amd64 3.1-20181209-1 [114 kB]
Get:12 http://deb.debian.org/debian buster/main amd64 libicu-dev amd64 63.1-6 [9181 kB]
Get:13 http://deb.debian.org/debian buster/main amd64 libonig5 amd64 6.9.1-1 [171 kB]
Get:14 http://deb.debian.org/debian buster/main amd64 libonig-dev amd64 6.9.1-1 [90.0 kB]
Get:15 http://deb.debian.org/debian buster/main amd64 libsodium23 amd64 1.0.17-1 [158 kB]
Get:16 http://deb.debian.org/debian buster/main amd64 libsodium-dev amd64 1.0.17-1 [176 kB]
Get:17 http://deb.debian.org/debian buster/main amd64 libsqlite3-0 amd64 3.27.2-3 [641 kB]
Get:18 http://deb.debian.org/debian buster/main amd64 libsqlite3-dev amd64 3.27.2-3 [787 kB]
Get:19 http://deb.debian.org/debian buster/main amd64 libssl-dev amd64 1.1.1d-0+deb10u2 [1793 kB]
Get:20 http://deb.debian.org/debian buster/main amd64 libxml2 amd64 2.9.4+dfsg1-7+b3 [687 kB]
Get:21 http://deb.debian.org/debian buster/main amd64 libxml2-dev amd64 2.9.4+dfsg1-7+b3 [783 kB]
Get:22 http://deb.debian.org/debian buster/main amd64 zlib1g-dev amd64 1:1.2.11.dfsg-1 [214 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 24.6 MB in 0s (59.7 MB/s)
Selecting previously unselected package libicu63:amd64.
(Reading database ... 12598 files and directories currently installed.)
Preparing to unpack .../00-libicu63_63.1-6_amd64.deb ...
Unpacking libicu63:amd64 (63.1-6) ...
Selecting previously unselected package icu-devtools.
Preparing to unpack .../01-icu-devtools_63.1-6_amd64.deb ...
Unpacking icu-devtools (63.1-6) ...
Selecting previously unselected package libargon2-1:amd64.
Preparing to unpack .../02-libargon2-1_0~20171227-0.2_amd64.deb ...
Unpacking libargon2-1:amd64 (0~20171227-0.2) ...
Selecting previously unselected package libargon2-dev:amd64.
Preparing to unpack .../03-libargon2-dev_0~20171227-0.2_amd64.deb ...
Unpacking libargon2-dev:amd64 (0~20171227-0.2) ...
Selecting previously unselected package libbsd0:amd64.
Preparing to unpack .../04-libbsd0_0.9.1-2_amd64.deb ...
Unpacking libbsd0:amd64 (0.9.1-2) ...
Selecting previously unselected package libbsd-dev:amd64.
Preparing to unpack .../05-libbsd-dev_0.9.1-2_amd64.deb ...
Unpacking libbsd-dev:amd64 (0.9.1-2) ...
Selecting previously unselected package libcurl4-openssl-dev:amd64.
Preparing to unpack .../06-libcurl4-openssl-dev_7.64.0-4_amd64.deb ...
Unpacking libcurl4-openssl-dev:amd64 (7.64.0-4) ...
Selecting previously unselected package libedit2:amd64.
Preparing to unpack .../07-libedit2_3.1-20181209-1_amd64.deb ...
Unpacking libedit2:amd64 (3.1-20181209-1) ...
Selecting previously unselected package libncurses6:amd64.
Preparing to unpack .../08-libncurses6_6.1+20181013-2+deb10u2_amd64.deb ...
Unpacking libncurses6:amd64 (6.1+20181013-2+deb10u2) ...
Selecting previously unselected package libncurses-dev:amd64.
Preparing to unpack .../09-libncurses-dev_6.1+20181013-2+deb10u2_amd64.deb ...
Unpacking libncurses-dev:amd64 (6.1+20181013-2+deb10u2) ...
Selecting previously unselected package libedit-dev:amd64.
Preparing to unpack .../10-libedit-dev_3.1-20181209-1_amd64.deb ...
Unpacking libedit-dev:amd64 (3.1-20181209-1) ...
Selecting previously unselected package libicu-dev:amd64.
Preparing to unpack .../11-libicu-dev_63.1-6_amd64.deb ...
Unpacking libicu-dev:amd64 (63.1-6) ...
Selecting previously unselected package libonig5:amd64.
Preparing to unpack .../12-libonig5_6.9.1-1_amd64.deb ...
Unpacking libonig5:amd64 (6.9.1-1) ...
Selecting previously unselected package libonig-dev.
Preparing to unpack .../13-libonig-dev_6.9.1-1_amd64.deb ...
Unpacking libonig-dev (6.9.1-1) ...
Selecting previously unselected package libsodium23:amd64.
Preparing to unpack .../14-libsodium23_1.0.17-1_amd64.deb ...
Unpacking libsodium23:amd64 (1.0.17-1) ...
Selecting previously unselected package libsodium-dev:amd64.
Preparing to unpack .../15-libsodium-dev_1.0.17-1_amd64.deb ...
Unpacking libsodium-dev:amd64 (1.0.17-1) ...
Selecting previously unselected package libsqlite3-0:amd64.
Preparing to unpack .../16-libsqlite3-0_3.27.2-3_amd64.deb ...
Unpacking libsqlite3-0:amd64 (3.27.2-3) ...
Selecting previously unselected package libsqlite3-dev:amd64.
Preparing to unpack .../17-libsqlite3-dev_3.27.2-3_amd64.deb ...
Unpacking libsqlite3-dev:amd64 (3.27.2-3) ...
Selecting previously unselected package libssl-dev:amd64.
Preparing to unpack .../18-libssl-dev_1.1.1d-0+deb10u2_amd64.deb ...
Unpacking libssl-dev:amd64 (1.1.1d-0+deb10u2) ...
Selecting previously unselected package libxml2:amd64.
Preparing to unpack .../19-libxml2_2.9.4+dfsg1-7+b3_amd64.deb ...
Unpacking libxml2:amd64 (2.9.4+dfsg1-7+b3) ...
Selecting previously unselected package libxml2-dev:amd64.
Preparing to unpack .../20-libxml2-dev_2.9.4+dfsg1-7+b3_amd64.deb ...
Unpacking libxml2-dev:amd64 (2.9.4+dfsg1-7+b3) ...
Selecting previously unselected package zlib1g-dev:amd64.
Preparing to unpack .../21-zlib1g-dev_1%3a1.2.11.dfsg-1_amd64.deb ...
Unpacking zlib1g-dev:amd64 (1:1.2.11.dfsg-1) ...
Setting up libsodium23:amd64 (1.0.17-1) ...
Setting up libargon2-1:amd64 (0~20171227-0.2) ...
Setting up libsqlite3-0:amd64 (3.27.2-3) ...
Setting up libicu63:amd64 (63.1-6) ...
Setting up libsqlite3-dev:amd64 (3.27.2-3) ...
Setting up libcurl4-openssl-dev:amd64 (7.64.0-4) ...
Setting up libncurses6:amd64 (6.1+20181013-2+deb10u2) ...
Setting up libssl-dev:amd64 (1.1.1d-0+deb10u2) ...
Setting up icu-devtools (63.1-6) ...
Setting up libsodium-dev:amd64 (1.0.17-1) ...
Setting up zlib1g-dev:amd64 (1:1.2.11.dfsg-1) ...
Setting up libargon2-dev:amd64 (0~20171227-0.2) ...
Setting up libbsd0:amd64 (0.9.1-2) ...
Setting up libicu-dev:amd64 (63.1-6) ...
Setting up libxml2:amd64 (2.9.4+dfsg1-7+b3) ...
Setting up libbsd-dev:amd64 (0.9.1-2) ...
Setting up libonig5:amd64 (6.9.1-1) ...
Setting up libncurses-dev:amd64 (6.1+20181013-2+deb10u2) ...
Setting up libonig-dev (6.9.1-1) ...
Setting up libedit2:amd64 (3.1-20181209-1) ...
Setting up libxml2-dev:amd64 (2.9.4+dfsg1-7+b3) ...
Setting up libedit-dev:amd64 (3.1-20181209-1) ...
Processing triggers for libc-bin (2.28-10) ...
+ rm -rf /var/lib/apt/lists/auxfiles /var/lib/apt/lists/deb.debian.org_debian_dists_buster-updates_InRelease /var/lib/apt/lists/deb.debian.org_debian_dists_buster-updates_main_binary-amd64_Packages.lz4 /var/lib/apt/lists/deb.debian.org_debian_dists_buster_InRelease /var/lib/apt/lists/deb.debian.org_debian_dists_buster_main_binary-amd64_Packages.lz4 /var/lib/apt/lists/lock /var/lib/apt/lists/partial /var/lib/apt/lists/security.debian.org_debian-security_dists_buster_updates_InRelease /var/lib/apt/lists/security.debian.org_debian-security_dists_buster_updates_main_binary-amd64_Packages.lz4
+ export CFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 LDFLAGS=-Wl,-O1 -Wl,--hash-style=both -pie
+ docker-php-source extract
/bin/sh: 1: docker-php-source: Permission denied
ERROR: Service 'phpfpm' failed to build: The command '/bin/sh -c set -eux;      savedAptMark="$(apt-mark showmanual)";  apt-get update;     apt-get install -y --no-install-recommends      libargon2-dev       libcurl4-openssl-dev        libedit-dev         libonig-dev         libsodium-dev       libsqlite3-dev      libssl-dev      libxml2-dev         zlib1g-dev      ${PHP_EXTRA_BUILD_DEPS:-}   ;   rm -rf /var/lib/apt/lists/*;        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                --enable-ftp        --enable-mbstring       --enable-mysqlnd        --with-password-argon2      --with-sodium=shared        --with-pdo-sqlite=/usr      --with-sqlite3=/usr                 --with-curl         --with-libedit  --with-openssl      --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 -executable -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;       pecl update-channels;   rm -rf /tmp/pear ~/.pearrc;     php --version' returned a non-zero code: 126

Thanks in advance.

question

Most helpful comment

If you want to build our Dockerfiles instead of just pulling the pre-built
images, I'd recommend using git clone instead of just copying the file
contents since clone will copy the right execute permissions bit, which is
probably what's missing here.

All 2 comments

If you want to build our Dockerfiles instead of just pulling the pre-built
images, I'd recommend using git clone instead of just copying the file
contents since clone will copy the right execute permissions bit, which is
probably what's missing here.

Closing since this is resolved

Was this page helpful?
0 / 5 - 0 ratings