-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
38 lines (30 loc) · 844 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM php:8.3-cli-alpine3.20
RUN apk add --no-cache \
autoconf \
brotli-dev \
curl \
gcc \
git \
g++ \
libcurl \
libtool \
make \
mysql-client \
openssl-dev \
pkgconf \
unzip \
zip \
&& docker-php-ext-install pdo_mysql pcntl \
&& pecl install swoole \
&& docker-php-ext-enable swoole
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
WORKDIR /app
COPY . /app
ARG APP_ENV
RUN if [ "$APP_ENV" = "local" ] || [ "$APP_ENV" = "dev" ]; then \
composer install --no-interaction --prefer-dist --optimize-autoloader --dev; \
else \
composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev; \
fi
EXPOSE 8000
CMD ["php", "artisan", "octane:start", "--host=0.0.0.0", "--port=8000"]