serversideup / docker-php

🐳 Production-ready Docker images for PHP. Optimized for Laravel, WordPress, and more!
https://serversideup.net/open-source/docker-php/
GNU General Public License v3.0
1.67k stars 109 forks source link

install-php-extensions does not work #293

Closed TacoV closed 5 months ago

TacoV commented 6 months ago

Affected Docker Images

serversideup/php:8.2-fpm-nginx

Docker Labels of the affected images

No response

Current Behavior

Cannot run install-php-extensions as advertised.

Expected Behavior

Running install-php-extensions installs the extension.

Steps To Reproduce

  1. Create this Dockerfile:
FROM serversideup/php:8.2-fpm-nginx

RUN install-php-extensions intl
  1. Run docker build .

  2. Get this error:

[+] Building 0.8s (5/5) FINISHED                                                                                                                                        docker:default
 => [internal] load build definition from Dockerfile                                                                                                                              0.0s
 => => transferring dockerfile: 106B                                                                                                                                              0.0s
 => [internal] load metadata for docker.io/serversideup/php:8.2-fpm-nginx                                                                                                         0.4s
 => [internal] load .dockerignore                                                                                                                                                 0.0s
 => => transferring context: 2B                                                                                                                                                   0.0s
 => CACHED [1/2] FROM docker.io/serversideup/php:8.2-fpm-nginx@sha256:6c81f2b8897e9a27ea1a36dc291a4f029fd31a6b4f7ef5916ece7f964300dc0a                                            0.0s
 => ERROR [2/2] RUN install-php-extensions intl                                                                                                                                   0.3s
------                                                                                                                                                                                 
 > [2/2] RUN install-php-extensions intl:
0.311 /bin/sh: 1: install-php-extensions: not found
------
Dockerfile:3
--------------------
   1 |     FROM serversideup/php:8.2-fpm-nginx
   2 |     
   3 | >>> RUN install-php-extensions intl
   4 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c install-php-extensions intl" did not complete successfully: exit code: 127

Host Operating System

Ubuntu 23.10

Docker Version

Client: Docker Engine - Community
 Version:           25.0.4
 API version:       1.44
 Go version:        go1.21.8
 Git commit:        1a576c5
 Built:             Wed Mar  6 16:32:12 2024
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          25.0.4
  API version:      1.44 (minimum version 1.24)
  Go version:       go1.21.8
  Git commit:       061aa95
  Built:            Wed Mar  6 16:32:12 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.28
  GitCommit:        ae07eda36dd25f8a1b98dfbf587313b99c0190bb
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Anything else?

No response

TacoV commented 6 months ago

A brief visit to the Discord leads me to believe switching to the beta image (eg beta-8.2-fpm-nginx) should fix it for now! Will test this soon

TacoV commented 6 months ago

Can confirm that it works as expected when using the beta image.

Incidentally, that image also has the pgsql extension enabled out-of-the-box, as suggested in the docs. Therefore I do not even need install-php-extensions anymore.

jaydrogers commented 5 months ago

Yup, sorry for the confusion. I am working on getting the beta merged soon. Glad they beta images are working well for you!