1
- FROM debian:wheezy
1
+ FROM php:5.6-apache
2
2
3
- RUN apt-get update && apt-get install -y \
4
- apache2 \
5
- curl \
6
- libapache2-mod-php5 \
7
- php5-curl \
8
- php5-gd \
9
- php5-mysql \
10
- rsync \
11
- wget \
12
- && rm -rf /var/lib/apt/lists/*
13
3
RUN a2enmod rewrite
14
4
15
- # copy a few things from apache's init script that it requires to be setup
16
- ENV APACHE_CONFDIR /etc/apache2
17
- ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars
18
- # and then a few more from $APACHE_CONFDIR/envvars itself
19
- ENV APACHE_RUN_USER www-data
20
- ENV APACHE_RUN_GROUP www-data
21
- ENV APACHE_RUN_DIR /var/run/apache2
22
- ENV APACHE_PID_FILE $APACHE_RUN_DIR/apache2.pid
23
- ENV APACHE_LOCK_DIR /var/lock/apache2
24
- ENV APACHE_LOG_DIR /var/log/apache2
25
- ENV LANG C
26
- RUN mkdir -p $APACHE_RUN_DIR $APACHE_LOCK_DIR $APACHE_LOG_DIR
27
-
28
- # make CustomLog (access log) go to stdout instead of files
29
- # and ErrorLog to stderr
30
- RUN find "$APACHE_CONFDIR" -type f -exec sed -ri ' \
31
- s!^(\s *CustomLog)\s +\S +!\1 /proc/self/fd/1!g; \
32
- s!^(\s *ErrorLog)\s +\S +!\1 /proc/self/fd/2!g; \
33
- ' '{}' ';'
34
-
35
5
RUN rm -rf /var/www/html && mkdir /var/www/html
36
6
VOLUME /var/www/html
37
7
WORKDIR /var/www/html
@@ -42,9 +12,6 @@ ENV WORDPRESS_UPSTREAM_VERSION 4.0
42
12
# upstream tarballs include ./wordpress/ so this gives us /usr/src/wordpress
43
13
RUN curl -SL http://wordpress.org/wordpress-${WORDPRESS_UPSTREAM_VERSION}.tar.gz | tar -xzC /usr/src/
44
14
45
- COPY docker-apache.conf /etc/apache2/sites-available/wordpress
46
- RUN a2dissite 000-default && a2ensite wordpress
47
-
48
15
COPY docker-entrypoint.sh /entrypoint.sh
49
16
50
17
ENTRYPOINT ["/entrypoint.sh" ]
0 commit comments