-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (31 loc) · 754 Bytes
/
Dockerfile
File metadata and controls
42 lines (31 loc) · 754 Bytes
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
FROM php:8.4.18-cli-alpine3.23
RUN apk update && apk upgrade && apk add --no-cache \
autoconf \
g++ \
make \
linux-headers \
libstdc++ \
brotli-dev \
libzip-dev \
openssl-dev \
&& rm -rf /var/cache/apk/*
RUN docker-php-ext-install \
pcntl \
sockets \
zip
RUN pecl channel-update pecl.php.net
RUN pecl install swoole && \
docker-php-ext-enable swoole
RUN pecl install redis && \
docker-php-ext-enable redis
WORKDIR /app
COPY composer.json ./
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
RUN composer install \
--no-dev \
--optimize-autoloader
COPY . .
RUN addgroup -S app && adduser -S -G app app
USER app
EXPOSE 8080 8081 8025
CMD ["php", "examples/http.php"]