@@ -4,7 +4,6 @@ MAINTAINER ngineered <support@ngineered.co.uk>
4
4
5
5
ENV php_conf /etc/php7/php.ini
6
6
ENV fpm_conf /etc/php7/php-fpm.d/www.conf
7
- ENV composer_hash 61069fe8c6436a4468d0371454cf38a812e451a14ab1691543f25a9627b97ff96d8753d92a00654c21e2212a5ae1ff36
8
7
9
8
RUN echo @testing http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \
10
9
sed -i -e "s/v3.4/edge/" /etc/apk/repositories && \
@@ -58,15 +57,11 @@ RUN echo @testing http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repo
58
57
mkdir -p /var/www/app && \
59
58
mkdir -p /run/nginx && \
60
59
mkdir -p /var/log/supervisor && \
61
- php7 -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
62
- php7 -r "if (hash_file('SHA384', 'composer-setup.php') === '${composer_hash}') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \
63
- php7 composer-setup.php --install-dir=/usr/bin --filename=composer && \
64
- php7 -r "unlink('composer-setup.php');" && \
65
60
pip install -U pip && \
66
61
pip install -U certbot && \
67
62
mkdir -p /etc/letsencrypt/webrootauth && \
68
63
apk del gcc musl-dev linux-headers libffi-dev augeas-dev python-dev
69
-
64
+
70
65
ADD conf/supervisord.conf /etc/supervisord.conf
71
66
72
67
# Copy our nginx config
@@ -109,22 +104,32 @@ RUN sed -i \
109
104
ln -s /etc/php7/php.ini /etc/php7/conf.d/php.ini && \
110
105
find /etc/php7/conf.d/ -name "*.ini" -exec sed -i -re 's/^(\s *)#(.*)/1円 ;2円 /g' {} \;
111
106
107
+ # Install/setup Python deps
108
+ RUN pip install requests
109
+
110
+ # Install WP-CLI
111
+ RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
112
+ RUN chmod +x wp-cli.phar
113
+ RUN sudo mv wp-cli.phar /usr/local/bin/wp
112
114
113
115
# Add Scripts
114
116
ADD scripts/start.sh /start.sh
115
117
ADD scripts/pull /usr/bin/pull
116
118
ADD scripts/push /usr/bin/push
117
119
ADD scripts/letsencrypt-setup /usr/bin/letsencrypt-setup
118
120
ADD scripts/letsencrypt-renew /usr/bin/letsencrypt-renew
121
+ ADD scripts/docker-hook /usr/bin/docker-hook
122
+ ADD scripts/hook-listener /usr/bin/hook-listener
123
+
124
+ # Setup permissions
119
125
RUN chmod 755 /usr/bin/pull && chmod 755 /usr/bin/push && chmod 755 /usr/bin/letsencrypt-setup && chmod 755 /usr/bin/letsencrypt-renew && chmod 755 /start.sh
126
+ RUN chmod +x /usr/bin/docker-hook
127
+ RUN chmod +x /usr/bin/hook-listener
120
128
121
129
# copy in code
122
130
ADD src/ /var/www/html/
123
- ADD errors/ /var/www/errors
124
-
125
- VOLUME /var/www/html
126
131
127
- EXPOSE 443 80
132
+ EXPOSE 443 80 8555
128
133
129
134
# CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisord.conf"]
130
- CMD ["/start.sh" ]
135
+ CMD ["/start.sh" ]
0 commit comments