-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathDockerfile
84 lines (66 loc) · 1.89 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
FROM node:22-alpine AS assets
WORKDIR /build
COPY app app
COPY help help
COPY lang lang
COPY resources resources
COPY \
.babelrc \
artisan \
package.json \
package-lock.json \
postcss.config.js \
tailwind.config.js \
vite.config.js \
./
RUN npm ci --no-audit --ignore-scripts
RUN npm run build
FROM php:8.2-fpm-alpine
ARG S6_OVERLAY_VERSION=3.2.0.0
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz /tmp
RUN tar -C / -Jxpf /tmp/s6-overlay-noarch.tar.xz
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-x86_64.tar.xz /tmp
RUN tar -C / -Jxpf /tmp/s6-overlay-x86_64.tar.xz
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
ENTRYPOINT ["/init"]
COPY docker/openssl/openssl.cnf /etc/ssl/openssl.cnf
COPY docker/nginx/nginx.conf /etc/nginx/nginx.conf
COPY docker/php/php.ini /usr/local/etc/php/php.ini
COPY docker/php/www.conf /usr/local/etc/php-fpm.d/zz-docker.conf
COPY docker/s6-rc.d /etc/s6-overlay/s6-rc.d
RUN apk update && \
# dependencies
apk add --no-cache \
nginx && \
#
# install extensions
install-php-extensions \
bcmath \
event \
excimer \
exif \
gd \
imagick \
intl \
opcache \
pdo_pgsql \
pcntl \
zip
ENV COMPOSER_ALLOW_SUPERUSER 1
ENV COMPOSER_HOME /tmp
ENV COMPOSER_CACHE_DIR /dev/null
WORKDIR /var/www
COPY --chown=www-data:www-data . /var/www
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
COPY --from=assets --chown=www-data:www-data /build/public/build /var/www/public/build
ARG VERSION
ARG REVISION
RUN echo "$VERSION (${REVISION:0:7})" > /var/www/.version
RUN composer install \
--optimize-autoloader \
--no-interaction \
--no-plugins \
--no-dev \
--prefer-dist
ENV LOG_CHANNEL stderr
EXPOSE 80