forked from KaiHofstetter/docker-wordpress-xdebug
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile_php5
74 lines (49 loc) · 1.79 KB
/
Dockerfile_php5
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
FROM ubuntu:14.04
MAINTAINER Denis Golovin <[email protected]>
# Install lamp stack plus curl
RUN apt-get update && \
apt-get -y install apache2 libapache2-mod-php5 php5 php5-mysql mysql-server curl php5-gd php5-curl \
wget subversion
ADD apache2.conf /etc/apache2/apache2.conf
# Download WordPress
RUN curl -L "https://wordpress.org/wordpress-latest.tar.gz" > /wordpress.tar.gz && \
rm /var/www/html/index.html && \
tar -xzf /wordpress.tar.gz -C /var/www/html --strip-components=1 && \
rm /wordpress.tar.gz
# Download WordPress CLI
RUN curl -L "https://github.com/wp-cli/wp-cli/releases/download/v1.0.0/wp-cli-1.0.0.phar" > /usr/bin/wp && \
chmod +x /usr/bin/wp
# WordPress configuration
ADD wp-config.php /var/www/html/wp-config.php
# Apache access
RUN chown -R www-data:www-data /var/www/html
# Add configuration script
ADD config_and_start_mysql.sh /config_and_start_mysql.sh
ADD config_apache.sh /config_apache.sh
ADD config_wordpress.sh /config_wordpress.sh
ADD run.sh /run.sh
RUN chmod 755 /*.sh
# MySQL environment variables
ENV MYSQL_WP_USER WordPress
ENV MYSQL_WP_PASSWORD secret
# WordPress environment variables
ENV WP_URL localhost
ENV WP_TITLE WordPress Demo
ENV WP_ADMIN_USER admin_user
ENV WP_ADMIN_PASSWORD secret
ENV WP_ADMIN_EMAIL [email protected]
# Install plugins
RUN apt-get update && \
apt-get -y --force-yes install php5-xdebug
# Add configuration script
ADD config_xdebug.sh /config_xdebug.sh
ADD run_wordpress_xdebug.sh /run_wordpress_xdebug.sh
ADD install-wp-tests.sh /install-wp-tests.sh
ADD wait-for-it.sh /wait-for-it.sh
RUN chmod 755 /*.sh
#RUN ./wait-for-it.sh localhost:3306 -t 99
#RUN bash /install-wp-tests.sh wordpress_test root '' localhost latest
# Xdebug environment variables
ENV XDEBUG_PORT 9000
EXPOSE 80 3306
CMD ["/run_wordpress_xdebug.sh"]