Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
57 lines (45 loc) · 1.4 KB
/
Copy pathDockerfile
File metadata and controls
57 lines (45 loc) · 1.4 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
FROM php:8.3-cli-alpine
RUN apk add --no-cache \
bash \
git \
unzip \
curl \
libzip-dev \
libpng-dev \
libjpeg-turbo-dev \
freetype-dev \
icu-dev \
zlib-dev \
oniguruma-dev \
autoconf \
gcc \
g++ \
make \
linux-headers \
tzdata \
inotify-tools
ENV TZ=UTC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN docker-php-ext-install \
mbstring \
zip \
exif \
pcntl \
bcmath \
intl \
sockets
RUN pecl install swoole && docker-php-ext-enable swoole
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
RUN echo "opcache.enable=1" >> /usr/local/etc/php/conf.d/opcache.ini && \
echo "opcache.enable_cli=1" >> /usr/local/etc/php/conf.d/opcache.ini && \
echo "opcache.jit=1235" >> /usr/local/etc/php/conf.d/opcache.ini && \
echo "opcache.jit_buffer_size=64M" >> /usr/local/etc/php/conf.d/opcache.ini && \
echo "opcache.memory_consumption=128" >> /usr/local/etc/php/conf.d/opcache.ini && \
echo "opcache.interned_strings_buffer=16" >> /usr/local/etc/php/conf.d/opcache.ini && \
echo "opcache.max_accelerated_files=10000" >> /usr/local/etc/php/conf.d/opcache.ini
WORKDIR /var/www/html
COPY . .
RUN composer install --no-dev --optimize-autoloader
RUN apk add --no-cache nodejs npm
RUN git config --global --add safe.directory /var/www/html
CMD ["tail", "-f", "/dev/null"]