Skip to content

Commit e6fa5c9

Browse files
#27 - Bump PHP to 8.1.2 and Composer to 2.2.5 (#28)
* #27 - update README; bump PHP to 8.1.2; bump Composer to 2.2.5 * #27 - update README * Update readme.md Co-authored-by: Krzysztof Rewak <[email protected]>
1 parent 20223c7 commit e6fa5c9

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
ARG PHP_VERSION=8.1.0
1+
ARG PHP_VERSION=8.1.2
22

33
FROM php:${PHP_VERSION}-fpm-alpine
44

5-
ARG COMPOSER_VERSION=2.1.12
5+
ARG COMPOSER_VERSION=2.2.5
66

77
ENV COMPOSER_HOME=/application/.composer
88
ENV COMPOSER_MEMORY_LIMIT=-1

readme.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ If you want, you can extend the provided configuration as follows:
4040
- .:/application
4141
restart: unless-stopped
4242
```
43-
4443
where `./environment/php/Dockerfile` will be:
4544
```dockerfile
46-
FROM ghcr.io/blumilksoftware/php:$VERSION
45+
ARG VERSION=8.1
46+
FROM ghcr.io/blumilksoftware/php:${VERSION}
4747
48-
ARG XDEBUG_VERSION=3.0.4
48+
ARG XDEBUG_VERSION=3.1.2
4949
ARG XDEBUG_HOST=172.17.0.1
5050
ARG XDEBUG_PORT=9003
5151
ARG XDEBUG_INSTALL=false
@@ -64,6 +64,18 @@ RUN if [ ${XDEBUG_INSTALL} = true ]; then \
6464
&& echo "xdebug.log_level=${XDEBUG_LOG_LEVEL}" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
6565
;fi
6666
```
67+
#### Change Composer version
68+
If you would like to use a different version of the Composer, you can override it in the Dockerfile:
69+
```dockerfile
70+
ARG PHP_VERSION=8.1
71+
ARG COMPOSER_TAG_VERSION=2.2
72+
73+
FROM composer:${COMPOSER_TAG_VERSION} as composer
74+
FROM ghcr.io/blumilksoftware/php:${PHP_VERSION}
6775
76+
COPY --from=composer /usr/bin/composer /usr/local/bin/composer
77+
78+
# the rest of Dockerfile
79+
```
6880
## Notes
6981
Please remember to add `.composer` directory of your project to `.gitignore` list. This directory is used to Composer cache actions and it should not be pushed to any repository.

0 commit comments

Comments
 (0)