Skip to content

Commit

Permalink
php 8.1 support & reduce image size
Browse files Browse the repository at this point in the history
  • Loading branch information
xtrime-ru committed Apr 17, 2022
1 parent b26f7f2 commit 9dc3fc2
Show file tree
Hide file tree
Showing 5 changed files with 177 additions and 151 deletions.
17 changes: 2 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM php:8.0-cli
FROM php:8.1-cli

ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.9.0/wait /usr/local/bin/docker-compose-wait
ADD docker/php/conf.d/. "$PHP_INI_DIR/conf.d/"

RUN apt-get update && apt-get upgrade -y \
&& apt-get install apt-utils procps -y \
Expand All @@ -25,20 +26,6 @@ RUN apt-get update && apt-get upgrade -y \
&& apt-get autoremove --purge -y && apt-get autoclean -y && apt-get clean -y \
&& rm -rf /usr/src

COPY . /app
WORKDIR /app

RUN cp -a docker/php/conf.d/. "$PHP_INI_DIR/conf.d/" \
&& composer install -o --no-dev \
&& composer clear

#Creating symlink to save .env in volume
RUN mkdir /app/sessions && \
touch '/app/sessions/.env.docker' && \
ln -s '/app/sessions/.env.docker' '/app/.env.docker'

VOLUME ["/app/sessions"]

EXPOSE 9503

ENTRYPOINT docker-compose-wait && nice -n 20 php server.php -e=.env.docker --docker -s=*
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"madelineproto"
],
"require": {
"php": "~8.0",
"php": "~8.0|~8.1",
"ext-json": "*",
"ext-mbstring": "*",
"ext-pcntl": "*",
Expand Down
Loading

0 comments on commit 9dc3fc2

Please sign in to comment.