forked from denysbulakh/ipc-2020-asyncphp-session
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
18 lines (14 loc) · 753 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
FROM php:8.0.0-cli
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
RUN php -r "if (hash_file('sha384', 'composer-setup.php') === '756890a4488ce9024fc62c56153228907f1545c228516cbf63f885e036d37e9a59d27d63f46af1d4d07ee0f76181c7d3') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
RUN php composer-setup.php
RUN php -r "unlink('composer-setup.php');"
RUN mv composer.phar /usr/local/bin/composer
RUN pecl install swoole
RUN touch /usr/local/etc/php/conf.d/swoole.ini && \
echo 'extension=swoole.so' > /usr/local/etc/php/conf.d/swoole.ini
RUN php --ri swoole
EXPOSE 8080
COPY . /usr/src/asyncphp
WORKDIR /usr/src/asyncphp
CMD [ "composer", "start-server" ]