-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.alpine
38 lines (31 loc) · 1.55 KB
/
Dockerfile.alpine
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
ARG WORDPRESS_VERSION=5.2.1-php7.3-fpm-alpine
FROM wordpress:${WORDPRESS_VERSION}
ARG NEW_RELIC_AGENT_URL='https://download.newrelic.com/php_agent/release/newrelic-php5-9.10.1.263-linux-musl.tar.gz'
ENV NEWRELIC_LICENSE='your-key'
ENV NEWRELIC_APPNAME='your-app'
USER 0
RUN apk add --no-cache bash bash-completion curl python py-pip less mailx && \
pip install crudini
ADD entrypoint.sh /usr/local/bin/
RUN chmod a+x /usr/local/bin/entrypoint.sh && \
curl -sS -L ${NEW_RELIC_AGENT_URL} | tar -C /tmp -zx && \
export NR_INSTALL_USE_CP_NOT_LN=1 && \
export NR_INSTALL_SILENT=1 && \
/tmp/newrelic-php5-*/newrelic-install install && \
rm -rf /tmp/newrelic-php5-* /tmp/nrinstall* && \
mv /usr/local/etc/php/conf.d/newrelic.ini /usr/local/etc/php/conf.d/newrelic.ini.template
RUN curl -ss -o /usr/local/bin/wp-cli -O https://gitcdn.link/repo/wp-cli/builds/gh-pages/phar/wp-cli.phar && \
chmod a+x /usr/local/bin/wp-cli
# Adds support for memcached
RUN apk add --no-cache --virtual build-dependencies build-base && \
apk --no-cache add autoconf zlib-dev libmemcached-dev && \
case $(echo $PHP_VERSION | cut -d '.' -f 1,2) in \
5.6) export MEMCACHED_VERSION="memcached-2.2.0";; \
7.*) export MEMCACHED_VERSION="memcached-3.1.3";; \
*) echo "Unsuported PHP version: $PHP_VERSION"; exit 1;; \
esac && \
pecl install $MEMCACHED_VERSION && \
docker-php-ext-enable memcached && \
apk del zlib-dev build-dependencies build-base
ENTRYPOINT ["/bin/bash", "/usr/local/bin/entrypoint.sh"]
CMD ["apache2-foreground"]