forked from etopian/alpine-php-wordpress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
80 lines (67 loc) · 2.14 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
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
FROM alpine:3.6
MAINTAINER Etopian Inc. <[email protected]>
LABEL devoply.type="site" \
devoply.cms="wordpress" \
devoply.framework="wordpress" \
devoply.language="php7" \
devoply.require="mariadb etopian/nginx-proxy" \
devoply.recommend="redis" \
devoply.description="WordPress on Nginx and PHP-FPM with WP-CLI." \
devoply.name="WordPress" \
devoply.params="docker run -d --name {container_name} -e VIRTUAL_HOST={virtual_hosts} -v /data/sites/{domain_name}:/DATA etopian/alpine-php7-wordpress"
RUN echo 'http://dl-4.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories\
&& apk update \
&& apk add --no-cache \
bash \
less \
vim \
nginx \
ca-certificates \
php7-fpm \
php7-json \
php7-zlib \
php7-xml \
php7-pdo \
php7-phar \
php7-openssl \
php7-pdo_mysql \
php7-mysqli \
php7-session \
php7-gd \
php7-iconv \
php7-mcrypt \
php7-curl \
php7-opcache \
php7-ctype \
php7-apcu \
php7-intl \
php7-bcmath \
php7-mbstring \
php7-dom \
php7-xmlreader \
mysql-client \
openssh-client \
git \
curl \
rsync \
musl \
&& apk --update --no-cache add tar
RUN rm -rf /var/cache/apk/*
ENV TERM="xterm" \
DB_HOST="172.17.0.1" \
DB_NAME="" \
DB_USER=""\
DB_PASS=""
ENV PATH /DATA/bin:$PATH
RUN sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' /etc/php7/php.ini && \
sed -i "s/nginx:x:100:101:nginx:\/var\/lib\/nginx:\/sbin\/nologin/nginx:x:100:101:nginx:\/DATA:\/bin\/bash/g" /etc/passwd && \
sed -i "s/nginx:x:100:101:nginx:\/var\/lib\/nginx:\/sbin\/nologin/nginx:x:100:101:nginx:\/DATA:\/bin\/bash/g" /etc/passwd-
ADD files/nginx.conf /etc/nginx/
ADD files/php-fpm.conf /etc/php7/
ADD files/run.sh /
ADD files/wp-config-devoply.php /usr/bin/wp-config-devoply
RUN chmod +x /run.sh && chmod +x /usr/bin/wp-config-devoply
RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && chmod +x wp-cli.phar && mv wp-cli.phar /usr/bin/wp-cli && chown nginx:nginx /usr/bin/wp-cli
EXPOSE 80
VOLUME ["/DATA"]
CMD ["/run.sh"]