-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
46 lines (35 loc) · 1.09 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
FROM celerative/nginx-php-fpm:7.1
MAINTAINER Celerative <[email protected]>
ENV WORDPRESS_VERSION latest
ENV APP_PATH /var/www/html/public
WORKDIR $APP_PATH
#
# Install SO deps
#
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ed \
&& rm -rf /var/lib/apt/lists/*
#
# Install PHP deps
#
RUN docker-php-ext-install mysqli
#
# Pull wordpress
#
RUN curl -o wordpress.tar.gz -fSL "https://wordpress.org/wordpress-${WORDPRESS_VERSION}.tar.gz" \
&& tar -xzf wordpress.tar.gz --strip-components 1 \
# Remove wordpress zip
&& rm wordpress.tar.gz \
# Set user and server permissions
&& chown -R www-data:www-data $APP_PATH/ \
# Set wp-config.php file available
&& mv wp-config-sample.php wp-config.php
# Copy default php configuration
COPY uploads.ini /usr/local/etc/php/conf.d/uploads.ini
# Project files. Those files should be into the src/ folder
ONBUILD COPY ./src/themes $APP_PATH/wp-content/themes
ONBUILD COPY ./src/plugins $APP_PATH/wp-content/plugins
COPY docker-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["/usr/bin/supervisord"]