-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
53 lines (40 loc) · 1.52 KB
/
Copy pathDockerfile
File metadata and controls
53 lines (40 loc) · 1.52 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
50
51
52
53
FROM jkirkby91/ubuntusrvbase:latest
MAINTAINER James Kirkby <james.kirkby@sonyatv.com>
# Install some packages
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y --force-yes --fix-missing apache2 apache2-mpm-event libapache2-mod-fastcgi --fix-missing && \
apt-get remove --purge -y software-properties-common build-essential && \
apt-get autoremove -y && \
apt-get clean && \
apt-get autoclean && \
echo -n > /var/lib/apt/extended_states && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /usr/share/man/?? && \
rm -rf /usr/share/man/??_*
# Copy global apache2 config
COPY confs/apache2/apache2.conf /etc/apache2/apache2.conf
# Set good permissions for logging files
RUN chmod -Rf 754 /var/log/apache2 && \
chown -R www-data:www-data /var/log/apache2
# Disable default site
RUN a2dissite 000-default
# Enable some apache mods
RUN a2enmod actions fastcgi alias rewrite macro
# Copy the php5-fpm mod conf to apache folders
COPY confs/apache2/conf-available/php5-fpm.conf /etc/apache2/conf-available/php5-fpm.conf
# Enable the fastcgi php5-fpm conf
RUN a2enconf php5-fpm
# Copy supervisor config to container
COPY confs/supervisord/supervisord.conf /etc/supervisord.conf
# Set permission for funny docker quirks
RUN usermod -u 1000 www-data && \
# this breaks access to a fastcgi conf stopping apache starting, so do a dutty fix
chown -Rf www-data:www-data /var/lib/apache2/fastcgi && \
chmod -Rf 754 /var/lib/apache2
# Expose Ports
EXPOSE 80
COPY start.sh /start.sh
RUN chmod 777 /start.sh
# Set entrypoint
CMD ["/bin/bash", "/start.sh"]