Skip to content

Commit

Permalink
Reduce image size by remerging layers
Browse files Browse the repository at this point in the history
  • Loading branch information
richarvey committed Mar 1, 2023
1 parent 7dd6e63 commit 4f33903
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
19 changes: 7 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,9 @@ RUN apk add --no-cache --virtual .sys-deps \
sqlite-dev \
imap-dev \
postgresql-dev \
lua-resty-core

# Install PHP modules
RUN docker-php-ext-configure gd \
lua-resty-core && \
# Install PHP modules
docker-php-ext-configure gd \
--enable-gd \
--with-freetype \
--with-jpeg && \
Expand All @@ -70,14 +69,10 @@ RUN docker-php-ext-configure gd \
pecl install -o -f redis && \
echo "extension=redis.so" > /usr/local/etc/php/conf.d/redis.ini && \
echo "zend_extension=xdebug" > /usr/local/etc/php/conf.d/xdebug.ini && \
docker-php-source delete
# mkdir -p /etc/nginx && \
# mkdir -p /var/www/app && \
# mkdir -p /run/nginx && \


# Install composer and certbot
RUN mkdir -p /var/log/supervisor && \
docker-php-source delete && \
mkdir -p /var/www/app && \
# Install composer and certbot
mkdir -p /var/log/supervisor && \
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
php composer-setup.php --quiet --install-dir=/usr/bin --filename=composer && \
rm composer-setup.php &&\
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ If you have improvements or suggestions please open an issue or pull request on
### Versioning
| Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version |
|-----|-------|-----|--------|--------|
| latest/3.0.2 | Master Branch |1.22.1 | 8.2.3 | 3.17 |
| latest/3.1.0 | Master Branch |1.22.1 | 8.2.3 | 3.17 |

For other tags please see: [versioning](https://github.com/richarvey/nginx-php-fpm/blob/master/docs/versioning.md)

Expand Down
1 change: 1 addition & 0 deletions docs/versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The latest tag will always follow the master branch in git. the other versions w

| Docker Tag | PHP Version | Nginx Version | Alpine Version | Container Scripts | Notes |
|-----|-------|-----|--------|--------|----------|
| 3.1.0 | 8.2.3 |1.22.1 | 3.17 | 0.3.17 | reduced image size |
| 3.0.2 | 8.2.3 |1.22.1 | 3.17 | 0.3.17 | fixed gd2 and xsl errors |
| 3.0.1 | 8.2.3 |1.22.1 | 3.17 | 0.3.17 | no cache typo fixed + TZ fixed in scripts |
| 3.0.0 | 8.2.3 |1.22.1 | 3.17 | 0.3.16 | upgraded php to 8.2.3 switched to packaged nginx |
Expand Down

0 comments on commit 4f33903

Please sign in to comment.