-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathDockerfile
40 lines (30 loc) · 1.37 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 debian:jessie
MAINTAINER [email protected]
# Default webdav user (CHANGE THIS!)
ENV WEBDAV_USERNAME admin
ENV WEBDAV_PASSWORD admin
# Defaults
WORKDIR /var/webdav
VOLUME /var/webdav/public
VOLUME /var/webdav/data
# Install nginx with php5 support
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y nginx php5-fpm && \
rm -rf /var/lib/apt/lists/*
# Install SabreDAV
RUN php -r "readfile('http://getcomposer.org/installer');" > composer-setup.php && \
php composer-setup.php --install-dir=/usr/bin --filename=composer && \
php -r "unlink('composer-setup.php');" && \
composer require sabre/dav ~3.1.3 && \
rm /usr/bin/composer
# Set up entrypoint
COPY scripts/install.sh /install.sh
# Configure nginx
COPY config/nginx/default /etc/nginx/sites-enabled/default
COPY config/nginx/fastcgi_params /etc/nginx/fastcgi_params
# forward request and error logs to docker log collector
RUN ln -sf /dev/stdout /var/log/nginx/access.log && \
ln -sf /dev/stderr /var/log/nginx/error.log
# copy server.php for client -- sabredav communication
COPY web/server.php /var/webdav/server.php
CMD /install.sh && service php5-fpm start && nginx -g "daemon off;"