Composer binary missing in circlecli/php image?

composer
php
php7.1

#1

I’m having problems installing php redis ext. using pecl but when I rebuild with SSH I’m able to install it.

version: 2
jobs:
  build:
    docker:
      # specify the version you desire here
      - image: circleci/php:7.1.5
      - image: redis:2.8.19
  steps:
      - checkout      
      - run: sudo pecl channel-update pecl.php.net
      - run: sudo pecl install redis && sudo docker-php-ext-enable redis

channel-update pecl command is run successfuly:

/bin/bash -eo pipefail
sudo pecl channel-update pecl.php.net
Updating channel "pecl.php.net"
Update of Channel “pecl.php.net” succeeded

but pecl install redis fails. I also tried to install zip extension over pecl, and this works, but installing redis doesn’t. I get the following output:

sudo pecl install redis && sudo docker-php-ext-enable redis
No releases available for package "pecl.php.net/redis"
install failed
Exited with code 1

Also, it seems that php image that I use doesn’t have composer binary and judging by this https://github.com/circleci/circleci-images/blob/master/php/generate-images#L14 it should have?


#2

I was able to solve the pecl problem above by using circleci/php:7.1-browsers instead of circleci/php:7.1.5. Seems like data on https://circleci.com/docs/2.0/circleci-images/#php is not in sync with https://hub.docker.com/r/circleci/php/tags/

However, problem with missing composer binary persists:

root@ff71ee6a51cf:/home/circleci# ls -al /usr/local/bin/
total 64548
drwxrwxr-x  2  500   500     4096 Jul 14 03:21 .
drwxrwsr-x 29 root staff     4096 Jul 19 22:37 ..
-rwxrwxr-x  1 root root       118 May 12 23:58 docker-php-entrypoint
-rwxrwxr-x  1 root root      1276 May 12 23:58 docker-php-ext-configure
-rwxrwxr-x  1 root root      2288 May 12 23:58 docker-php-ext-enable
-rwxrwxr-x  1 root root      2223 May 12 23:58 docker-php-ext-install
-rwxrwxr-x  1 root root       587 May 12 23:58 docker-php-source
-rwxr-xr-x  1  501 staff  7470394 Apr  4 05:31 dockerize
-rwxrwxr-x  1  500   500 34764936 Jul 11 01:10 node
lrwxrwxrwx  1 root root        19 Jul 14 03:21 nodejs -> /usr/local/bin/node
lrwxrwxrwx  1  500   500       38 Jul 11 01:10 npm -> ../lib/node_modules/npm/bin/npm-cli.js

There is no composer binary in /usr/local/bin/


#3

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.