Skip to content
Advertisement

PECL Package Installation Fail In Docker

When installing opencensus-alpha from PECL package manager in docker as part of dockerfile, an error is thrown /bin/sh: pecl: not found

Dockerfile

JavaScript

Is there any easy way opencensus-alpha can be installed and enabled in a docker container

Advertisement

Answer

You’ll need the php7-pear package to get the pecl command, and you’ll need php-dev, gcc, musl-dev, and make packages for pecl and phpize be be able to build and install other packages correctly.

Add a new RUN line:

JavaScript

or amend your existing RUN line:

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement