-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile.7.x-cli
65 lines (56 loc) · 2.24 KB
/
Dockerfile.7.x-cli
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
54
55
56
57
58
59
60
61
62
63
64
65
FROM bearstech/debian:stretch
ARG PHP_MINOR_VERSION
ENV DEBIAN_FRONTEND noninteractive
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG PHP_VERSION
LABEL php.version=${PHP_VERSION}
RUN set -eux \
&& export http_proxy=${HTTP_PROXY} \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
apt-transport-https \
ca-certificates \
curl \
gettext-base \
lsb-release \
msmtp \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& touch /etc/msmtprc \
&& chmod 640 /etc/msmtprc \
&& curl https://packages.sury.org/php/apt.gpg -o /etc/apt/trusted.gpg.d/php-sury.gpg \
&& echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee -a /etc/apt/sources.list.d/php-sury.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
php7.${PHP_MINOR_VERSION}-cli \
php7.${PHP_MINOR_VERSION}-curl \
php7.${PHP_MINOR_VERSION}-gd \
php7.${PHP_MINOR_VERSION}-mbstring \
php7.${PHP_MINOR_VERSION}-mysql \
php7.${PHP_MINOR_VERSION}-xml \
php7.${PHP_MINOR_VERSION}-zip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& chmod 666 /etc/msmtprc
COPY config_msmtp.sh /usr/local/bin/
COPY entrypoint_cli.sh /usr/local/bin
COPY sendmail /opt/sendmail
RUN ln -sf /opt/sendmail /usr/local/bin/sendmail
COPY conf/php7.${PHP_MINOR_VERSION}.ini /etc/php/7.${PHP_MINOR_VERSION}/cli/php.ini
COPY conf/memory.ini /etc/php/7.${PHP_MINOR_VERSION}/cli/conf.d/01-memory.ini
# Entrypoint.d
COPY entrypoint.d.sh /usr/local/bin/
COPY entrypoint.d /entrypoint.d/
ENTRYPOINT ["entrypoint_cli.sh"]
CMD ["php"]
# generated labels
ARG GIT_VERSION
ARG GIT_DATE
ARG BUILD_DATE
LABEL \
com.bearstech.image.revision.date=${GIT_DATE} \
org.opencontainers.image.authors=Bearstech \
org.opencontainers.image.revision=${GIT_VERSION} \
org.opencontainers.image.created=${BUILD_DATE} \
org.opencontainers.image.url=https://github.com/factorysh/docker-php \
org.opencontainers.image.source=https://github.com/factorysh/docker-php/blob/${GIT_VERSION}/Dockerfile.7.x-cli