-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
executable file
·53 lines (38 loc) · 1.67 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
ARG PHP_VERSION=8.1
FROM php:${PHP_VERSION}-fpm as php
RUN apt update \
&& apt install -y libxslt1-dev zlib1g-dev g++ git libicu-dev zip libzip-dev zip nfs4-acl-tools acl gnupg2 \
&& docker-php-ext-install intl opcache \
&& docker-php-ext-install xsl \
&& pecl install apcu \
&& docker-php-ext-enable apcu \
&& docker-php-ext-configure zip \
&& docker-php-ext-install zip \
&& apt-get remove -y libxslt1-dev icu-devtools libicu-dev libxml2-dev \
&& rm -rf /var/lib/apt/lists/*
COPY docker/php/docker-healthcheck.sh /usr/local/bin/docker-healthcheck
RUN chmod +x /usr/local/bin/docker-healthcheck
HEALTHCHECK --interval=10s --timeout=3s --retries=3 CMD ["docker-healthcheck"]
WORKDIR /srv/app
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
ENV COMPOSER_ALLOW_SUPERUSER=1
ARG SKELETON="coral-media/crune"
ENV SKELETON ${SKELETON}
ARG STABILITY="stable"
ENV STABILITY ${STABILITY}
ARG CRUNE_VERSION=""
ENV CRUNE_VERSION ${CRUNE_VERSION}
COPY docker/php/docker-entrypoint.sh /usr/local/bin/docker-entrypoint
RUN chmod +x /usr/local/bin/docker-entrypoint
RUN composer create-project "${SKELETON} ${CRUNE_VERSION}" . --stability=$STABILITY \
--prefer-dist --no-dev --no-progress --no-interaction;
RUN git config --global user.email "${GIT_DEVELOPER_EMAIL}" \
&& git config --global user.name "${GIT_DEVELOPER_USER}"
COPY . .
RUN set -eux; \
mkdir -p var/cache var/log; \
composer install --prefer-dist --no-dev --no-progress --no-scripts --no-interaction; \
composer dump-autoload --classmap-authoritative --no-dev; \
chmod +x bin/console; sync
ENTRYPOINT ["docker-entrypoint"]
CMD ["php-fpm"]