-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
44 lines (32 loc) · 863 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
39
40
41
42
43
44
FROM dunglas/frankenphp:php8.2-alpine
ENV SERVER_NAME=:80
WORKDIR /app/public
RUN install-php-extensions \
pcntl \
pdo_mysql \
gd \
intl \
zip \
opcache \
redis
RUN (curl -f https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer) && composer -V
COPY composer.* .
RUN composer install \
--no-autoloader \
--prefer-dist \
--ansi \
--no-dev \
--profile \
--no-cache \
--no-scripts \
--no-interaction \
--no-progress
COPY . .
RUN chown -R www-data:www-data ./storage ./bootstrap/cache
RUN set -xe \
&& composer dump-autoload || true \
&& php artisan optimize:clear --ansi || true
COPY ./docker/docker-entrypoint.sh /entrypoint.sh
ENV FRANKENPHP_CONFIG="worker ./public/index.php"
EXPOSE 2019
ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]