-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
48 lines (38 loc) · 1.25 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
FROM alpine:3.9
ARG BUILD_DATE
ARG VCS_REF
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="WP-CLI baked with Composer on top of Alpine Linux" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.docker.dockerfile="/Dockerfile" \
org.label-schema.vcs-url="https://github.com/soifou/wpcli-alpine"
ENV WP_CLI_VERSION 1.5.1
ADD https://dl.bintray.com/php-alpine/key/php-alpine.rsa.pub /etc/apk/keys/php-alpine.rsa.pub
RUN echo "https://dl.bintray.com/php-alpine/v3.9/php-7.3" >> /etc/apk/repositories && \
apk add --update --no-cache \
bash \
curl \
less \
freetype-dev libjpeg-turbo-dev libpng-dev \
mariadb-client \
php7 \
php7-dom \
php7-ftp \
php7-gd \
php7-openssl \
php7-phar \
php7-iconv \
php7-mbstring \
php7-mongodb \
php7-mysqli \
php7-zlib
RUN ln -sf /usr/bin/php7 /usr/bin/php
ADD ./composer.sh /composer.sh
RUN chmod u+x /composer.sh; sync && /composer.sh
RUN rm -rf /tmp/src && \
rm -f /composer.sh \
rm -rf /var/cache/apk/*
RUN composer create-project wp-cli/wp-cli:$WP_CLI_VERSION /usr/share/wp-cli --no-dev && \
composer clear-cache
RUN ln -s /usr/share/wp-cli/bin/wp /usr/bin/wp
ENTRYPOINT ["/usr/bin/wp", "--allow-root", "--path=/mnt"]