Skip to content

Commit 5640bd9

Browse files
committed
Activating OpCache
Closes laradock#307
1 parent 8bb69be commit 5640bd9

3 files changed

Lines changed: 13 additions & 1 deletion

File tree

php-fpm/Dockerfile-56

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ RUN if [ ${INSTALL_OPCACHE} = true ]; then \
114114
docker-php-ext-enable opcache \
115115
;fi
116116

117+
# Copy opcache configration
118+
COPY ./opcache.ini /usr/local/etc/php/conf.d/opcache.ini
119+
117120
#
118121
#--------------------------------------------------------------------------
119122
# Final Touch

php-fpm/Dockerfile-70

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ RUN if [ ${INSTALL_OPCACHE} = true ]; then \
125125
docker-php-ext-enable opcache \
126126
;fi
127127

128+
# Copy opcache configration
129+
COPY ./opcache.ini /usr/local/etc/php/conf.d/opcache.ini
128130

129131

130132
#
@@ -144,4 +146,4 @@ WORKDIR /var/www/laravel
144146

145147
CMD ["php-fpm"]
146148

147-
EXPOSE 9000
149+
EXPOSE 9000

php-fpm/opcache.ini

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
extension=opcache.so
2+
opcache.enable="1"
3+
opcache.memory_consumption="256"
4+
opcache.use_cwd="0"
5+
opcache.fast_shutdown="1"
6+
opcache.max_file_size="0"
7+
opcache.validate_timestamps="0"

0 commit comments

Comments
 (0)