-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
47 lines (37 loc) · 1.01 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
47
FROM ubuntu:latest
MAINTAINER Loyal Johnson <[email protected]>
# Update apt repo data
RUN apt-get update
RUN apt-get -yq upgrade
# Install packages
RUN DEBIAN_FRONTEND=noninteractive apt-get -yq install \
curl \
apache2 \
libapache2-mod-php5 \
php5-mysql \
php5-gd \
php5-curl \
php-pear \
php-apc \
php5-mongo \
mongodb-clients
# Save space by removing apt data after we're done with it
RUN rm -rf /var/lib/apt/lists/*
# Set the server name in apache config
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
# Whatever
RUN sed -i "s/variables_order.*/variables_order = \"EGPCS\"/g" /etc/php5/apache2/php.ini
# Disable HTACCESS overwrite by default
ENV ALLOW_OVERRIDE true
# Add image configuration and scripts
ADD run.sh /run.sh
RUN chmod 755 /*.sh
# Configure /app folder with sample app
RUN mkdir -p /app
ADD app/ /app
RUN rm -fr /var/www/html
RUN ln -s /app/www /var/www/html
# ADD app/ /app
EXPOSE 80
WORKDIR /app
CMD ["/run.sh"]