Running legacy on PHP 7.2

PHP 7.2 릴리즈에서 많은 확장들이 deprecated되었다. 하지만 버전업을 해도 레거시 코드는 여전히 돌아가야 하니 돌릴 방법 만들어야 했다. 아래는 그 결과.
FROM php:7.2-fpm-alpine
RUN apk add –no-cache –update\
 pcre-dev ${PHPIZE_DEPS}  tzdata libmcrypt-dev zlib-dev libzip-dev imagemagick git \
&& apk add –no-cache –virtual build-dependencies \
&& pecl install mcrypt-1.0.1 redis zip xdebug\
&& docker-php-ext-install mysqli \
&& docker-php-ext-enable zip mcrypt redis xdebug\
&& apk del build-dependencies \
&& apk del pcre-dev ${PHPIZE_DEPS} \
&& rm -rf /tmp/*

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.