-
Notifications
You must be signed in to change notification settings - Fork 212
/
Dockerfile
58 lines (51 loc) · 1.41 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
FROM phpswoole/swoole:4.8-php8.0 as Build
ARG timezone
ENV APP_DEBUG=false
RUN sed -i "s@http://deb.debian.org@https://repo.huaweicloud.com@g" /etc/apt/sources.list \
&& sed -i "s@http://security.debian.org@https://repo.huaweicloud.com@g" /etc/apt/sources.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
libonig-dev \
wget \
libzip-dev \
libpng-dev \
libicu-dev \
libbz2-dev \
procps \
zip \
unzip \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
libwebp-dev \
rm -rf /var/lib/apt/lists/*
RUN set -ex \
&& pecl update-channels \
&& pecl install redis-stable \
&& docker-php-ext-enable redis \
&& docker-php-ext-configure pcntl --enable-pcntl \
&& docker-php-ext-configure bcmath --enable-bcmath \
&& docker-php-ext-configure mbstring --enable-mbstring \
&& docker-php-ext-configure mysqli --with-mysqli \
&& docker-php-ext-configure pdo_mysql --with-pdo-mysql \
&& docker-php-ext-configure zip \
&& docker-php-ext-configure gd --enable-gd --with-freetype --with-jpeg --with-webp \
&& docker-php-ext-install \
gd \
bcmath \
intl \
pcntl \
mysqli \
pdo_mysql \
mbstring \
iconv \
bz2 \
sockets \
zip \
opcache \
exif
WORKDIR /app
COPY . /app
EXPOSE 9501
RUN composer install --no-dev -o
ENTRYPOINT ["php", "/app/bin/swoole.php", "start"]