File tree Expand file tree Collapse file tree 3 files changed +55
-5
lines changed Expand file tree Collapse file tree 3 files changed +55
-5
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,18 @@ FROM php:7.4-fpm-alpine
44# Maintainer
55LABEL maintainer="Alexander Graf <alex@basecamp.tirol>"
66
7+ # Build arguments
8+ ARG VCS_REF=master
9+ ARG BUILD_DATE=""
10+
11+ # http://label-schema.org/rc1/
12+ LABEL org.label-schema.schema-version "1.0"
13+ LABEL org.label-schema.name "PHP7-FPM"
14+ LABEL org.label-schema.build-date "${BUILD_DATE}"
15+ LABEL org.label-schema.description "All-purpose PHP-FPM 7.4 Docker image that comes with the most popular extensions"
16+ LABEL org.label-schema.vcs-url "https://github.com/otherguy/docker-php7-fpm"
17+ LABEL org.label-schema.vcs-ref "${VCS_REF}"
18+
719# Install dependencies
820RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS \
921 && apk add --no-cache curl shadow sqlite curl-dev freetype-dev libpng-dev libjpeg-turbo-dev \
Original file line number Diff line number Diff line change @@ -22,9 +22,47 @@ or other PHP 7.4+ applications. Just use this lightweight and convenient image.
2222
2323## 🌈 Quick Start
2424
25- * simple example docker file
26- * zz-** .ini files for custom config
27- * apk add --no-cache --virtual .build-deps $PHPIZE_DEPS && pecl install mongodb && docker-php-ext-enable mongodb
25+ ### Create your Docker image
26+
27+ Base your Docker image on ` otherguy/php7-fpm:7.4 ` , add your project files and you're ready to go!
28+
29+ ``` Dockerfile
30+ # Dockerfile
31+ FROM otherguy/php7-fpm:7.4
32+
33+ COPY --chown=www-data:www-data . /srv
34+ ```
35+
36+ ### Customize PHP settings
37+
38+ If you want to change the PHP configuration or overwrite some defaults, simply create your own
39+ configuration file, have the filename start with a ` z ` and add it to the image.
40+
41+ ``` ini
42+ # zz-custom.ini
43+ post_max_size = 100M
44+ upload_max_filesize = 100M
45+ ```
46+
47+ ``` Dockerfile
48+ # Dockerfile
49+ ...
50+ COPY zz-custom.ini /usr/local/etc/php/conf.d/
51+ ...
52+ ```
53+
54+ ### Add PHP extensions
55+
56+ It's simple to add your own extensions to the image!
57+
58+ ``` Dockerfile
59+ # Dockerfile
60+ ...
61+ RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS \
62+ && pecl install mongodb \
63+ && docker-php-ext-enable mongodb
64+ ...
65+ ```
2866
2967## 📚 Description
3068
Original file line number Diff line number Diff line change @@ -4,9 +4,9 @@ short_open_tag = Off
44max_execution_time = 20
55max_input_nesting_level = 32
66memory_limit = 256M
7- post_max_size = 50M
7+ post_max_size = 25M
88default_charset = " utf-8"
9- upload_max_filesize = 50M
9+ upload_max_filesize = 25M
1010max_file_uploads = 5
1111default_socket_timeout = 5
1212display_errors = On
You can’t perform that action at this time.
0 commit comments