-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
49 lines (38 loc) · 1.31 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
ARG OORT_VERSION=8.4
FROM php:${OORT_VERSION}-alpine
# Set Label
LABEL org.opencontainers.image.authors="Emre Çalışkan [email protected]"
# Install PHP extensions
RUN set -eux; \
apk update --no-cache; \
apk upgrade --no-cache; \
apk add --no-cache --virtual .build-deps $PHPIZE_DEPS postgresql-dev brotli-dev icu-dev libzip-dev; \
apk add --no-cache libstdc++ postgresql-libs icu-libs libzip; \
pecl install igbinary redis swoole; \
docker-php-ext-enable igbinary redis swoole; \
docker-php-ext-install bcmath intl pcntl pdo_mysql pdo_pgsql zip; \
apk del --no-network .build-deps; \
rm -rf /tmp/pear /usr/local/lib/php/test /usr/local/lib/php/doc /usr/local/lib/php/.registry;
# Install composer
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
# Set Production INI
RUN cp /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini
# Add User
RUN set -eux; \
addgroup -S -g 10000 oort; \
adduser -D -u 1000 -s /bin/sh oort -G oort; \
rm -rf /var/www/html; \
chown -R oort:oort /var/www; \
chmod -R 755 /var/www;
# Set User
USER oort
# Setup working directory
WORKDIR /var/www
# Port Expose
EXPOSE 80
# Add Graceful Stop Signal
STOPSIGNAL SIGTERM
# Add Environment
ARG OORT_VERSION=8.4
ENV OORT_VERSION=${OORT_VERSION:-8.4}
ENV APP_ENV=production