Skip to content

Commit

Permalink
fix docker for work with 8.0 and 8.2 versions
Browse files Browse the repository at this point in the history
  • Loading branch information
otis22 committed Jun 20, 2023
1 parent f32cca4 commit d5ea92f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
default_php_version:=7.4
default_php_version:=8.1
php_version:=$(PHP_VERSION)
ifndef PHP_VERSION
php_version:=$(default_php_version)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -413,11 +413,11 @@ or connect to terminal
```shell
make exec
```
*Dafault php version is 7.4*. Use PHP_VERSION= for using custom version.
*Dafault php version is 8.1*. Use PHP_VERSION= for using custom version. Now is available only 8.0 and 8.1 versions.
```shell
make all PHP_VERSION=8.0
# run both
make all PHP_VERSION=7.4 && make all PHP_VERSION=8.0
make all PHP_VERSION=8.0 && make all PHP_VERSION=8.1
```

*For integration tests copy .env.example to .env and fill with yours values*
Expand Down
14 changes: 9 additions & 5 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ FROM php:${VERSION}-cli-alpine

WORKDIR /app

RUN apk --no-cache add pcre-dev ${PHPIZE_DEPS} \
&& pecl install xdebug \
&& apk del pcre-dev ${PHPIZE_DEPS}
RUN apk add --update linux-headers \
&& apk --no-cache add icu-libs \
&& apk --no-cache add icu-data-full \
&& apk --no-cache add icu-dev \
&& apk --no-cache add pcre-dev ${PHPIZE_DEPS} \
&& pecl install xdebug \
&& apk del pcre-dev ${PHPIZE_DEPS}

RUN docker-php-ext-install -j$(nproc) bcmath
RUN docker-php-ext-install -j$(nproc) bcmath intl

RUN curl -sS https://getcomposer.org/installer | \
php -- --2 --install-dir=/usr/local/bin --filename=composer
php -- --2 --install-dir=/usr/local/bin --filename=composer

0 comments on commit d5ea92f

Please sign in to comment.