-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile.common
110 lines (101 loc) · 3.38 KB
/
Dockerfile.common
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
WORKDIR /var/www
ENTRYPOINT ["/entrypoint.sh"]
CMD ["/launch.sh"]
ARG DEBIAN_FRONTEND=noninteractive
ENV PHP_VERSION=${PHP_VERSION} \
NODE_VERSION=${NODE_VERSION} \
COMPOSER_VERSION=${COMPOSER_VERSION:-2} \
ENABLE_PHP=On \
ENABLE_REDIS=Off \
ENABLE_CRON=Off \
ENABLE_SSH=Off \
ENABLE_DEV=Off \
NEWRELIC_LICENSE= \
NGINX_CONF=default \
NGINX_PORT=8080 \
NODE_PORT=3000 \
NODE_START= \
PHP_DISPLAY_ERRORS=Off \
PHP_OPCACHE_VALIDATE=On \
PHP_MAX_CHILDREN=30 \
PHP_TIMEZONE=Europe/London \
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
NUXT_TELEMETRY_DISABLED=1 \
NEXT_TELEMETRY_DISABLED=1 \
SSH_PORT=2222 \
CHISEL_PORT=8022 \
WEB_ROOT=/var/www \
WEB_PUBLIC= \
COMPOSER_MEMORY_LIMIT=-1 \
COMPOSER_PROCESS_TIMEOUT=600 \
XDEBUG_ENABLE=Off \
XDEBUG_HOST= \
SMTP_HOST=smtp.mailtrap.io \
SMTP_PORT=2525 \
SMTP_USER= \
SMTP_PASS= \
SMTP_FROM=
RUN apt-get update \
&& apt-get install --no-install-recommends --yes \
bash-completion \
ca-certificates \
cron \
curl \
debconf \
git \
gnupg \
less \
msmtp \
nano \
patch \
python3 \
python3-pip \
rsync \
ssh \
sudo \
supervisor \
unzip \
wget \
&& echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections \
&& . /etc/lsb-release \
&& echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu $DISTRIB_CODENAME main" >> /etc/apt/sources.list \
&& echo "deb-src http://ppa.launchpad.net/ondrej/php/ubuntu $DISTRIB_CODENAME main" >> /etc/apt/sources.list \
&& echo "deb http://ppa.launchpad.net/ondrej/nginx-mainline/ubuntu $DISTRIB_CODENAME main" >> /etc/apt/sources.list \
&& echo "deb-src http://ppa.launchpad.net/ondrej/nginx-mainline/ubuntu $DISTRIB_CODENAME main" >> /etc/apt/sources.list \
# New Relic
&& echo "deb http://apt.newrelic.com/debian/ newrelic non-free" >> /etc/apt/sources.list \
&& wget -O- https://download.newrelic.com/548C16BF.gpg | sudo apt-key add - \
# For older node, install 20.04 compatible release then downgrade in build.sh
&& if [ "$NODE_VERSION" -lt "10" ]; then export NODE_VERSION=14; fi \
&& echo "deb https://deb.nodesource.com/node_$NODE_VERSION.x $DISTRIB_CODENAME main" >> /etc/apt/sources.list \
&& echo "deb-src https://deb.nodesource.com/node_$NODE_VERSION.x $DISTRIB_CODENAME main" >> /etc/apt/sources.list \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C 1655A0AB68576280 \
&& apt-get update \
&& apt-get install --no-install-recommends --yes \
newrelic-php5 \
nginx \
nodejs \
redis-server \
# PHP
php${PHP_VERSION}-fpm \
php${PHP_VERSION}-bcmath \
php${PHP_VERSION}-common \
php${PHP_VERSION}-curl \
php${PHP_VERSION}-intl \
php${PHP_VERSION}-mbstring \
php${PHP_VERSION}-mysql \
php${PHP_VERSION}-opcache \
php${PHP_VERSION}-soap \
php${PHP_VERSION}-sqlite3 \
php${PHP_VERSION}-xml \
php${PHP_VERSION}-xsl \
php${PHP_VERSION}-zip \
php${PHP_VERSION}-xdebug \
php${PHP_VERSION}-redis \
# Cleanup
&& rm -Rf /var/www/* \
&& rm -rf /var/lib/apt/lists/*
COPY . /
RUN /build.sh
USER edge
EXPOSE $NGINX_PORT