This repository was archived by the owner on Dec 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
50 lines (39 loc) · 1.42 KB
/
Dockerfile
File metadata and controls
50 lines (39 loc) · 1.42 KB
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
FROM php:5.6-apache
# Allow the DOCROOT to be configurable
ENV DOCROOT=/var/www/docroot
# Enable pretty urls in drupal.
RUN a2enmod rewrite
# The basics that drupal needs to function
RUN apt-get update && apt-get install -y \
libpng12-dev \
libjpeg-dev \
libpq-dev \
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
&& docker-php-ext-install -j$(nproc) \
gd \
mbstring \
opcache \
pdo \
pdo_mysql \
pdo_pgsql \
zip
# Setup a place for php to log errors. Turns out this isn't needed because
# apache will log the php errors, but this is a handy example to get logs
# out to work with docker logs commands.
# RUN set -ex \
# && . "$APACHE_ENVVARS" \
# && ln -sfT /dev/stderr "$APACHE_LOG_DIR/php-error.log"
RUN pecl install xdebug \
&& docker-php-ext-enable xdebug
# Install memcached so we can talk to a memcache server.
RUN apt-get update && apt-get install -y libmemcached-dev \
&& pecl install memcached \
&& docker-php-ext-enable memcached
# Override the docroot of the base image with our own.
RUN sed -i "s:/var/www/html:$DOCROOT:g" $APACHE_CONFDIR/sites-available/000-default.conf
# Mount the /var/www folder and allow it to be shared.
VOLUME /var/www
# Update user ids to match OSX, so apache uses the correct UIDs for www-data.
RUN usermod -u 1000 www-data
RUN usermod -G staff www-data
WORKDIR $DOCROOT