Add to your Dockerfile:
RUN docker-php-ext-configure opcache --enable-opcache \
&& docker-php-ext-install opcache
ADD php-config/opcache.ini /usr/local/etc/php/conf.d/opcache.ini
ADD php-config/opcache-blacklist.txt /usr/local/etc/opcache-blacklist.txt
Create php-config/opcache.ini
with this content:
opcache.memory_consumption=128