Docker : phpize cannot find config.m4

I’m using Laradock on Windows 7. I need to install bz2 extension, so I edited the php-fpm Dockerfile-70 as below.

Added below code –

  • How to install docker-compose on Linux RHEL 6.6?
  • Cannot get postgresql-9.3-postgis-2.1 on Ubuntu 14.04.1 Docker container
  • Using Docker to load Memory Image?
  • COPY and ADD not working in Dockerfile
  • How to build a docker container with nix?
  • AWS ECS Error when running task: No Container Instances were found in your cluster
  • ARG INSTALL_BZ2=true
    RUN if [ ${INSTALL_BZ2} = true ]; then \
        # Install the bz2 extension
        pecl install bz2 && \
        docker-php-ext-enable bz2 \
    ;fi
    

    Then when I run docker-compose build php-fpm I get few following error. I did google search and tried suggestions, nothing so far worked.

    running: phpize

    Cannot find config.m4.

    Make sure that you run
    ‘/usr/local/bin/phpize’ in the top level source directory of the
    module

    ERROR: `phpize’ failed

    Please advice on this.

  • what is 'z' flag in docker container's volumes-from option?
  • docker run with ENTRYPOINT containing a variable
  • wordpress container cannot connect to mariadb container
  • updating docker image given changes to local filesystem
  • How to debug a rails app in docker with pry?
  • tar command not found in Dockerfile
  • One Solution collect form web for “Docker : phpize cannot find config.m4”

    Install the bz2 lib and the php extension like this:

    RUN apt-get install -y libbz2-dev \
        && docker-php-ext-install bz2
    
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.