webdevops / php-docker-boilerplate

:stew: PHP Docker Boilerplate for Symfony, Wordpress, Joomla or any other PHP Project (NGINX, Apache HTTPd, PHP-FPM, MySQL, Solr, Elasticsearch, Redis, FTP)
https://webdevops.io/projects/php-docker-boilerplate/
MIT License
561 stars 185 forks source link

How to use PHP 7.1 or even PHP 7.2? #76

Closed patrioticcow closed 6 years ago

patrioticcow commented 6 years ago

PHP 7.0 is good, just that some applications I have use the 7.2 features

Any ideas on how to upgrade both dev and production?

I could use this image webdevops/php-apache-dev:7.1 but then I get Memcached >= 2.2.0 is required

Thank you.

patrioticcow commented 6 years ago

I think I made it work by installing memcached-3.0.4

I'm open to a more elegant solution

FROM webdevops/php-apache-dev:7.1

ENV PROVISION_CONTEXT "development"

# Deploy scripts/configurations
COPY etc/             /opt/docker/etc/

RUN ln -sf /opt/docker/etc/cron/crontab /etc/cron.d/docker-boilerplate \
    && apt-get update && apt-get install -y libmemcached11 libmemcachedutil2 build-essential libmemcached-dev libz-dev \
    && pecl install memcached-3.0.4 \
    && echo extension=memcached.so >> /usr/local/etc/php/conf.d/memcached.ini \
    && chmod 0644 /opt/docker/etc/cron/crontab \
    && echo >> /opt/docker/etc/cron/crontab \
    && ln -sf /opt/docker/etc/php/development.ini /opt/docker/etc/php/php.ini

# Configure volume/workdir
WORKDIR /app/
kniziol commented 6 years ago

Tried using: FROM webdevops/php-apache-dev:7.2 and it failed: ERROR: Service 'app' failed to build: manifest for webdevops/php-apache-dev:7.2 not found

So, is PHP 7.2 supported?

htuscher commented 6 years ago

See https://github.com/webdevops/Dockerfile/issues/211