forked from ZooRoyal/coding-standard-source
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
37 lines (31 loc) · 1.09 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
FROM php:8-cli-alpine
RUN set -eux ; \
apk add --no-cache --virtual .composer-rundeps \
bash \
coreutils \
git \
nodejs \
npm \
openssh-client \
tini \
unzip \
zip \
$([ "$(apk --print-arch)" != "x86" ] && echo mercurial) \
$([ "$(apk --print-arch)" != "armhf" ] && echo p7zip)
# Config Git
RUN git config --global --add safe.directory /app
RUN git config --global user.email "[email protected]" && \
git config --global user.name "Coding-Standard container"
# Allow more memory for php processes
RUN echo 'memory_limit = 2G' >> /usr/local/etc/php/conf.d/memory-limit.ini
RUN echo 'error_reporting = E_ALL & ~E_DEPRECATED' >> /usr/local/etc/php/conf.d/error-reporting.ini
# Install Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
ENV COMPOSER_ALLOW_SUPERUSER 1
# Install Coding-Standard-Source
RUN mkdir /coding-standard
COPY . /coding-standard/
WORKDIR /coding-standard/
RUN composer install --no-dev --no-interaction --no-progress --optimize-autoloader
WORKDIR /app/
ENTRYPOINT [ "/coding-standard/src/bin/coding-standard" ]