|
1 | | -FROM php:8.3-cli |
| 1 | +FROM phpswoole/swoole:5.1.3-php8.3 |
2 | 2 |
|
3 | | -RUN pecl install swoole > /dev/null && \ |
4 | | - docker-php-ext-enable swoole |
| 3 | +RUN docker-php-ext-install pcntl opcache curl > /dev/null |
5 | 4 |
|
6 | | -RUN docker-php-ext-install pdo_mysql > /dev/null |
7 | | - |
8 | | -ADD ./ /lumen |
9 | 5 | WORKDIR /lumen |
10 | | -COPY deploy/swoole/php.ini /usr/local/etc/php/ |
11 | | - |
12 | | -RUN mkdir -p /lumen/storage/framework/sessions |
13 | | -RUN mkdir -p /lumen/storage/framework/views |
14 | | -RUN mkdir -p /lumen/storage/framework/cache |
15 | | - |
16 | | -RUN chmod -R 777 /lumen |
| 6 | +ADD --link . . |
17 | 7 |
|
18 | | -# Install composer using the installation method documented at https://getcomposer.org/doc/faqs/how-to-install-composer-programmatically.md |
19 | | -# This method was chosen because composer is not part of the apt repositories that are in the default PHP 7.2 docker image |
20 | | -# Adding alternate apt php repos can potentially cause problems with extension compatibility between the php build from the docker image and the alternate php build |
21 | | -# An additional benefit of this method is that the correct version of composer will be used for the environment and version of the php system in the docker image |
22 | | -RUN deploy/swoole/install-composer.sh |
| 8 | +COPY --link deploy/swoole/php.ini /usr/local/etc/php/ |
23 | 9 |
|
24 | | -RUN apt-get update -yqq > /dev/null && \ |
25 | | - apt-get install -yqq git unzip > /dev/null |
| 10 | +RUN mkdir -p /lumen/storage/framework/sessions /lumen/storage/framework/views /lumen/storage/framework/cache |
26 | 11 |
|
27 | 12 | COPY deploy/swoole/composer* ./ |
28 | | -RUN php composer.phar install --optimize-autoloader --classmap-authoritative --no-dev --quiet |
| 13 | +RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet |
29 | 14 |
|
30 | 15 | RUN echo "APP_SWOOLE=true" >> .env |
31 | 16 |
|
32 | 17 | RUN chmod -R 777 /lumen |
33 | 18 |
|
34 | 19 | EXPOSE 8080 |
35 | 20 |
|
36 | | -CMD php artisan swoole:http start |
| 21 | +ENTRYPOINT [ "php", "artisan", "swoole:http", "start" ] |
0 commit comments