forked from hacklabr/docker-wordpress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
27 lines (22 loc) · 947 Bytes
/
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
FROM hacklab/php:5.6-apache
MAINTAINER Hacklab <[email protected]>
RUN curl -s -o wp-cli.phar 'https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar' \
&& chmod +x wp-cli.phar \
&& mv wp-cli.phar /usr/local/bin/wp \
&& wp core download --path=/var/www/html/ --version=4.8.1 --locale=pt_BR --allow-root \
&& { \
echo "file_uploads = On"; \
echo "upload_max_filesize = 2048M"; \
echo "post_max_size = 2048M"; \
echo "max_file_uploads = 20"; \
} > /usr/local/etc/php/conf.d/wordpress-uploads.ini
COPY docker-entrypoint.sh /entrypoint.sh
COPY htaccess /var/www/html/.htaccess
COPY wp-config.php /var/www/html/wp-config.php
RUN chown -R www-data: /var/www/html/ \
&& mkdir -p /docker-entrypoint-extra \
&& echo "alias wp='/usr/local/bin/wp --allow-root'" >> /root/.bashrc
ENV PAGER /bin/cat
EXPOSE 80 443
ENTRYPOINT ["/entrypoint.sh"]
CMD ["apache2-foreground"]