File tree 13 files changed +79
-0
lines changed
0b8bd94e9858e5d32d058dc0acf75014/usr/src/myapp
99385a54402816a5f74271f4e0a9badb/usr/src/myapp
b4da654cf208a69f67bc28fe74e17149/usr/src/myapp
fd7939a025c0c1db4352c2c10e4400f5/usr/src/myapp
13 files changed +79
-0
lines changed Original file line number Diff line number Diff line change 1
1
* .pyc
2
2
* .tmp
3
3
hunt_opcache
4
+ tests /opcache /Dockerfile
5
+ tests /systemid /Dockerfile
Original file line number Diff line number Diff line change
1
+ FROM php:%%PHP_VERSION%%-cli-alpine
2
+
3
+ # Override with custom opcache settings
4
+ RUN docker-php-ext-install opcache
5
+ COPY opcache.ini $PHP_INI_DIR/conf.d/
6
+
7
+ COPY test.php /usr/src/myapp/
8
+ WORKDIR /usr/src/myapp
9
+ CMD [ "php", "./test.php" ]
Original file line number Diff line number Diff line change
1
+ VERSIONS = 7.0 7.1 7.2 7.3
2
+ prepare :
3
+ for version in ${VERSIONS} ; do \
4
+ sed -r " s!%%PHP_VERSION%%!$$ version!g;" Dockerfile.template > Dockerfile ; \
5
+ docker build -t opcache-test-$$ version . ; \
6
+ done
7
+
8
+ test :
9
+ for version in ${VERSIONS} ; do \
10
+ docker run -it --rm --user 1000 -v " ${CURDIR} " /opcache/:/tmp/opcache opcache-test-$$ version ; \
11
+ done
Original file line number Diff line number Diff line change
1
+ [opcache]
2
+ ; Determines if Zend OPCache is enabled
3
+ opcache.enable =1
4
+
5
+ ; Determines if Zend OPCache is enabled for the CLI version of PHP
6
+ ; opcache.enable_cli=0
7
+ opcache.enable_cli =1
8
+
9
+ ; Enables or disables opcode caching in shared memory.
10
+ ; opcache.file_cache_only=0
11
+ opcache.file_cache_only =1
12
+
13
+ ; Enables and sets the second level cache directory.
14
+ ; It should improve performance when SHM memory is full, at server restart or
15
+ ; SHM reset. The default "" disables file based caching.
16
+ ; opcache.file_cache=
17
+ opcache.file_cache = /tmp/opcache
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ print ("Hello World! \n" );
4
+
5
+ ?>
Original file line number Diff line number Diff line change
1
+ FROM php:%%PHP_VERSION%%-apache
2
+ COPY phpinfo.php /var/www/html
Original file line number Diff line number Diff line change
1
+ VERSIONS = 7.0 7.1 7.2 7.3
2
+ prepare :
3
+ for version in ${VERSIONS} ; do \
4
+ sed -r " s!%%PHP_VERSION%%!$$ version!g;" Dockerfile.template > Dockerfile ; \
5
+ docker build -t systemid-test-$$ version . ; \
6
+ done
7
+
8
+ test :
9
+ for version in ${VERSIONS} ; do \
10
+ docker run -d -p 80:80 --rm --name systemid-test-$$ version-run systemid-test-$$ version ; \
11
+ sleep 2 ; \
12
+ ../../system_id_scraper.py http://127.0.0.1/phpinfo.php ; \
13
+ docker stop systemid-test-$$ version-run ; \
14
+ sleep 2 ; \
15
+ done
Original file line number Diff line number Diff line change
1
+ [opcache]
2
+ ; Determines if Zend OPCache is enabled
3
+ opcache.enable =1
4
+
5
+ ; Determines if Zend OPCache is enabled for the CLI version of PHP
6
+ ; opcache.enable_cli=0
7
+ opcache.enable_cli =1
8
+
9
+ ; Enables or disables opcode caching in shared memory.
10
+ ; opcache.file_cache_only=0
11
+ opcache.file_cache_only =1
12
+
13
+ ; Enables and sets the second level cache directory.
14
+ ; It should improve performance when SHM memory is full, at server restart or
15
+ ; SHM reset. The default "" disables file based caching.
16
+ ; opcache.file_cache=
17
+ opcache.file_cache = /tmp/opcache
Original file line number Diff line number Diff line change
1
+ <?php phpinfo (); ?>
You can’t perform that action at this time.
0 commit comments