-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
59 lines (45 loc) · 1.36 KB
/
Dockerfile
File metadata and controls
59 lines (45 loc) · 1.36 KB
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
#
# Prep App's PHP Dependencies
#
FROM composer/composer:2-bin as composer
FROM composer:2.5.1 as vendor
WORKDIR /app
COPY composer.json composer.json
COPY composer.lock composer.lock
RUN composer install --no-scripts
FROM php:8.2-fpm-alpine as phpserver
# add cli tools
RUN apk update \
&& apk upgrade \
&& apk add nginx
RUN apk add --no-cache \
libzip-dev \
zip \
freetype \
libpng \
libjpeg-turbo \
freetype-dev \
libpng-dev \
libjpeg-turbo-dev \
&& docker-php-ext-configure gd \
--with-freetype --with-jpeg \
&& NPROC=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1) \
&& docker-php-ext-install -j${NPROC} gd \
&& apk del --no-cache freetype-dev libpng-dev libjpeg-turbo-dev \
&& docker-php-ext-install zip
# silently install 'docker-php-ext-install' extensions
RUN set -x
RUN docker-php-ext-install pdo_mysql bcmath > /dev/null
# Install INTL
RUN apk add icu-dev
RUN docker-php-ext-configure intl && docker-php-ext-install intl && docker-php-ext-enable intl
COPY nginx.conf /etc/nginx/nginx.conf
COPY php.ini /usr/local/etc/php/conf.d/local.ini
RUN cat /usr/local/etc/php/conf.d/local.ini
WORKDIR /var/www
COPY . /var/www/
COPY --from=vendor /app/vendor /var/www/vendor
COPY --from=composer /composer /usr/bin/composer
EXPOSE 80
COPY docker-entry.sh /etc/entrypoint.sh
ENTRYPOINT ["sh", "/etc/entrypoint.sh"]