thecodingmachine / docker-images-php

A set of PHP Docker images
MIT License
792 stars 140 forks source link

`./install.sh: 1: ../core/excimer: not found` in php 8.3 v4 slim apache #390

Closed beejaz closed 2 months ago

beejaz commented 5 months ago

Expected Behavior

Using ARG PHP_EXTENSIONS="pdo_mysql excimer" in Dockerfile should install excimer extension.

Current Behavior

Docker build fails with message

#6 12.23 ./install.sh: 1: ../core/excimer: not found
#6 ERROR: executor failed running [/bin/bash -o pipefail -c sudo -E PHP_EXTENSIONS="$PHP_EXTENSIONS" /usr/local/bin/install_selected_extensions.sh]: exit code: 127

Possible Solution

All other extensions use symlinks in extension folder, excimer uses a regular folder. Could this be the cause of the issue? https://github.com/thecodingmachine/docker-images-php/tree/v4/extensions/8.3/excimer

Context

Im trying to build a docker image from the 8.3 v4 slim apache image with extension pdo_mysql and excimer activated

ARG PHP_EXTENSIONS="pdo_mysql excimer"
FROM thecodingmachine/php:8.3-v4-slim-apache as php_base

Your Environment

0 building with "default" instance using docker driver
#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 32B done
#1 DONE 0.0s
#2 [internal] load .dockerignore
#2 transferring context: 2B done
#2 DONE 0.0s
#3 [internal] load metadata for docker.io/thecodingmachine/php:8.3-v4-slim-apache
#3 DONE 0.8s
#4 [ 1/10] FROM docker.io/thecodingmachine/php:8.3-v4-slim-apache@sha256:15dc23cb193886713b2f51239251637c254a5fadeaa62e77e46b03c7681871c7
#4 CACHED
#5 [internal] load build context
#5 transferring context: 13.28kB 0.0s done
#5 DONE 0.0s
#6 [ 2/10] RUN sudo -E PHP_EXTENSIONS="pdo_mysql excimer" /usr/local/bin/install_selected_extensions.sh
#6 0.472 + mv /etc/apt/apt.conf.d/docker-clean /tmp/docker-clean
#6 0.499 + apt-get update
#6 0.[79](https://gitlab.greylight.se/glos/legacy/glos-v1.5/-/jobs/2042#L79)0 Get:1 http://ppa.launchpad.net/ondrej/php/ubuntu focal InRelease [24.6 kB]
#6 0.835 Get:2 http://security.ubuntu.com/ubuntu focal-security InRelease [128 kB]
#6 0.854 Get:3 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB]
#6 1.059 Get:4 http://ppa.launchpad.net/ondrej/php/ubuntu focal/main amd64 Packages [213 kB]
#6 1.374 Get:5 http://archive.ubuntu.com/ubuntu focal-updates InRelease [128 kB]
#6 1.420 Get:6 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [3616 kB]
#6 1.505 Get:7 http://archive.ubuntu.com/ubuntu focal-backports InRelease [128 kB]
#6 1.636 Get:8 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages [1275 kB]
#6 1.877 Get:9 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages [177 kB]
#6 1.896 Get:10 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages [11.3 MB]
#6 2.000 Get:11 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [3675 kB]
#6 2.116 Get:12 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [1211 kB]
#6 2.132 Get:13 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages [29.8 kB]
#6 2.322 Get:14 http://archive.ubuntu.com/ubuntu focal/restricted amd64 Packages [33.4 kB]
#6 2.322 Get:15 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [32.5 kB]
#6 2.322 Get:16 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1509 kB]
#6 2.356 Get:17 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [3776 kB]
#6 2.494 Get:18 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [4154 kB]
#6 2.635 Get:19 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 Packages [55.2 kB]
#6 2.635 Get:20 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [28.6 kB]
#6 5.087 Fetched 31.8 MB in 4s (7129 kB/s)
#6 5.087 Reading package lists...
#6 7.236 + /usr/bin/real_php /usr/local/bin/install_selected_extensions.php
#6 7.455 *** Installing extensions ***
#6 7.463 + '[' -n '' ']'
#6 7.463 + '[' -n '' ']'
#6 7.463 + '[' -n '' ']'
#6 7.463 + '[' -n mysqlnd ']'
#6 7.463 + set +e
#6 7.463 + PACKAGE_NAME=mysql
#6 7.464 + apt-cache search --names-only php8.3-mysql
#6 7.464 + grep php8.3-mysql
#6 7.691 php8.3-mysql - MySQL module for PHP
#6 7.691 + set -e
#6 7.691 + apt-get install -y --no-install-recommends php8.3-mysql
#6 7.799 Reading package lists...
#6 7.840 Building dependency tree...
#6 8.129 Reading state information...
#6 8.622 The following NEW packages will be installed:
#6 8.622   php8.3-mysql
#6 8.703 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
#6 8.703 Need to get 117 kB of archives.
#6 8.703 After this operation, 466 kB of additional disk space will be used.
#6 8.703 Get:1 http://ppa.launchpad.net/ondrej/php/ubuntu focal/main amd64 php8.3-mysql amd64 8.3.7-2+ubuntu20.04.1+deb.sury.org+1 [117 kB]
#6 9.039 debconf: delaying package configuration, since apt-utils is not installed
#6 9.0[83](https://gitlab.greylight.se/glos/legacy/glos-v1.5/-/jobs/2042#L83) Fetched 117 kB in 0s (762 kB/s)
#6 9.234 Selecting previously unselected package php8.3-mysql.
(Reading database ... 11148 files and directories currently installed.)
#6 9.334 Preparing to unpack .../php8.3-mysql_8.3.7-2+ubuntu20.04.1+deb.sury.org+1_amd64.deb ...
#6 9.339 Unpacking php8.3-mysql (8.3.7-2+ubuntu20.04.1+deb.sury.org+1) ...
#6 9.495 Setting up php8.3-mysql (8.3.7-2+ubuntu20.04.1+deb.sury.org+1) ...
#6 9.731 
#6 9.731 Creating config file /etc/php/8.3/mods-available/mysqlnd.ini with new version
#6 10.30 
#6 10.30 Creating config file /etc/php/8.3/mods-available/mysqli.ini with new version
#6 10.79 
#6 10.79 Creating config file /etc/php/8.3/mods-available/pdo_mysql.ini with new version
#6 11.06 Processing triggers for libapache2-mod-php8.3 (8.3.7-2+ubuntu20.04.1+deb.sury.org+1) ...
#6 11.08 Processing triggers for php8.3-cli (8.3.7-2+ubuntu20.04.1+deb.sury.org+1) ...
#6 11.45 + '[' -n '' ']'
#6 11.45 + '[' -n '' ']'
#6 11.45 + '[' -n mysqlnd ']'
#6 11.45 + phpenmod -v 8.3 mysqlnd
#6 11.52 + /usr/bin/real_php -m
#6 11.52 + grep mysqlnd
#6 11.[98](https://gitlab.greylight.se/glos/legacy/glos-v1.5/-/jobs/2042#L98) mysqlnd
#6 11.98 ++ /usr/bin/real_php -r 'echo '\'''\'';'
#6 12.02 + OUTPUT=
#6 12.02 + [[ '' == '' ]]
#6 12.02 + phpdismod -v 8.3 mysqlnd
#6 12.09 + '[' -n '' ']'
#6 12.23 ./install.sh: 1: ../core/excimer: not found
#6 ERROR: executor failed running [/bin/bash -o pipefail -c sudo -E PHP_EXTENSIONS="$PHP_EXTENSIONS" /usr/local/bin/install_selected_extensions.sh]: exit code: 127
------
 > [ 2/10] RUN sudo -E PHP_EXTENSIONS="pdo_mysql excimer" /usr/local/bin/install_selected_extensions.sh:
11.45 + phpenmod -v 8.3 mysqlnd
11.52 + /usr/bin/real_php -m
11.52 + grep mysqlnd
11.98 mysqlnd
11.98 ++ /usr/bin/real_php -r 'echo '\'''\'';'
12.02 + OUTPUT=
12.02 + [[ '' == '' ]]
12.02 + phpdismod -v 8.3 mysqlnd
12.09 + '[' -n '' ']'
12.23 ./install.sh: 1: ../core/excimer: not found
------
ERROR: failed to solve: executor failed running [/bin/bash -o pipefail -c sudo -E PHP_EXTENSIONS="$PHP_EXTENSIONS" /usr/local/bin/install_selected_extensions.sh]: exit code: 127
stale[bot] commented 3 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please update it if any action still required.

beejaz commented 3 months ago

@mistraloz hi, any idea on the issue?

ikulis commented 2 months ago

Similar issue for thecodingmachine/php:8.2-v4-slim-cli

ARG PHP_EXTENSIONS="excimer"

FROM thecodingmachine/php:8.2-v4-slim-cli

Results in

3.765 Get:18 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [4399 kB]
4.152 Get:19 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [28.6 kB]
4.157 Get:20 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 Packages [55.2 kB]
4.447 Fetched 33.0 MB in 4s (7859 kB/s)
4.447 Reading package lists...
5.517 + /usr/bin/real_php /usr/local/bin/install_selected_extensions.php
5.542 *** Installing extensions ***
5.542 The following extension(s) is not supported: excimer
5.542 Supported extensions: amqp, apcu, ast, bcmath, blackfire, bz2, dba, ds, enchant, ffi, gd, gmp, grpc, igbinary, imagick, imap, intl, ldap, mailparse, memcached, mongodb, msgpack, mysqli, pcov, pdo_dblib, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, pspell, rdkafka, redis, snmp, soap, sqlite3, tidy, uploadprogress, uuid, xdebug, xmlrpc, yaml, zip
------
failed to solve: process "/bin/bash -o pipefail -c sudo -E PHP_EXTENSIONS=\"$PHP_EXTENSIONS\" /usr/local/bin/install_selected_extensions.sh" did not complete successfully: exit code: 1
make: *** [Makefile:72: dev-build] Error 17
beejaz commented 2 months ago

Confirmed working now, thank you!