-
Notifications
You must be signed in to change notification settings - Fork 12
/
Dockerfile
43 lines (26 loc) · 1.03 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
FROM composer:2.0 as step0
ARG TESTING=false
ENV TESTING=$TESTING
WORKDIR /usr/local/src/
COPY composer.lock /usr/local/src/
COPY composer.json /usr/local/src/
RUN composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist
RUN docker-php-ext-install sockets
FROM php:8.0-cli-alpine as final
ENV DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
ENV DOCKER_API_VERSION=1.43
LABEL maintainer="team@appwrite.io"
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN \
apk update \
&& apk add --no-cache make automake autoconf gcc g++ git brotli-dev docker-cli \
&& docker-php-ext-install sockets \
&& docker-php-ext-install opcache
WORKDIR /usr/src/code
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
RUN echo "opcache.enable_cli=1" >> $PHP_INI_DIR/php.ini
RUN echo "memory_limit=1024M" >> $PHP_INI_DIR/php.ini
COPY --from=step0 /usr/local/src/vendor /usr/src/code/vendor
# Add Source Code
COPY . /usr/src/code
CMD [ "tail", "-f", "/dev/null" ]