windowsdockerinstallationphalcon

Phalcon Installation In Docker


I am trying to install phalcon in docker and I cannot figure out how to do it.

I am searching through the web for solutions and couldn't manage to make it work.

I successfully installed docker for windows and it seems to work fine but i cannot find a way to install docker.

Can anyone help me to install phalcon in docker ?

Thanks in advance


Solution

  • You can create a Dockerfile which is compiling Phalcon for you:

    FROM php:7.2-fpm
    
    ENV PHALCON_VERSION=3.4.2
    
    RUN curl -sSL "https://codeload.github.com/phalcon/cphalcon/tar.gz/v${PHALCON_VERSION}" | tar -xz \
        && cd cphalcon-${PHALCON_VERSION}/build \
        && ./install \
        && cp ../tests/_ci/phalcon.ini $(php-config --configure-options | grep -o "with-config-file-scan-dir=\([^ ]*\)" | awk -F'=' '{print $2}') \
        && cd ../../ \
        && rm -r cphalcon-${PHALCON_VERSION}