forked from marius311/boinc-server-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
39 lines (31 loc) · 1.05 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
FROM php:5.6.17-apache
MAINTAINER Marius Millea <[email protected]>
#install packages
RUN apt-get update && apt-get install -y \
cron \
libjpeg62-turbo-dev \
libpng12-dev \
mysql-client \
python \
rsyslog \
supervisor
#configure server
RUN docker-php-ext-install mysqli \
&& docker-php-ext-configure gd --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install gd \
&& a2enmod cgi
#see https://github.com/docker/docker/issues/14651
RUN rm -rf /root && mkdir /root && chmod 755 /root
#so that www-data can read/write boinc server files (boinc server runs as root)
RUN adduser www-data root
COPY .bashrc /root/.bashrc
#build configuration
ENV PROJHOME=/root/project
RUN ln -s $PROJHOME/boincserver.httpd.conf /etc/apache2/sites-enabled/boincserver.httpd.conf
WORKDIR $PROJHOME
#logrotate
COPY logrotate /etc/logrotate.d/boincserver
RUN chmod 644 /etc/logrotate.d/boincserver
#set up supervisor to run
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
CMD ["/usr/bin/supervisord"]