forked from pschmitt/docker-owncloud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
51 lines (43 loc) · 1.76 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
48
49
50
51
FROM debian:8.0
MAINTAINER Philipp Schmitt <[email protected]>
# Dependencies
# TODO: Add NFS support
RUN export DEBIAN_FRONTEND=noninteractive; \
apt-get update && \
apt-get install -y cron bzip2 php5-cli php5-gd php5-pgsql php5-sqlite \
php5-mysqlnd php5-curl php5-intl php5-mcrypt php5-ldap php5-gmp php5-apcu \
php5-imagick php5-fpm smbclient nginx supervisor && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV OWNCLOUD_VERSION 8.0.3
ENV TIMEZONE UTC
# ownCloud dist
ADD https://github.com/owncloud/core/archive/v${OWNCLOUD_VERSION}.tar.gz \
/tmp/owncloud.tar.gz
ADD https://github.com/owncloud/3rdparty/archive/v${OWNCLOUD_VERSION}.tar.gz \
/tmp/3rdparty.tar.gz
# Config files
ADD nginx_nossl.conf /etc/nginx/nginx_nossl.conf
ADD nginx_ssl.conf /etc/nginx/nginx_ssl.conf
ADD php.ini /etc/php5/fpm/php.ini
ADD php-cli.ini /etc/php5/cli/php.ini
ADD cron.conf /etc/owncloud-cron.conf
ADD supervisor-owncloud.conf /etc/supervisor/conf.d/supervisor-owncloud.conf
ADD run.sh /usr/bin/run.sh
ADD occ.sh /usr/bin/occ
# Install owncloud
RUN tar -C /var/www/ -xvf /tmp/owncloud.tar.gz && \
tar -C /var/www/ -xvf /tmp/3rdparty.tar.gz && \
mv /var/www/core-${OWNCLOUD_VERSION} /var/www/owncloud && \
rmdir /var/www/owncloud/3rdparty && \
mv /var/www/3rdparty-${OWNCLOUD_VERSION} /var/www/owncloud/3rdparty && \
chmod +x /usr/bin/run.sh && \
rm /tmp/owncloud.tar.gz /tmp/3rdparty.tar.gz && \
su -s /bin/sh www-data -c "crontab /etc/owncloud-cron.conf"
EXPOSE 80 443
VOLUME ["/var/www/owncloud/config", "/var/www/owncloud/data", \
"/var/www/owncloud/apps", "/var/log/nginx", \
"/etc/ssl/certs/owncloud.crt", "/etc/ssl/private/owncloud.key"]
WORKDIR /var/www/owncloud
# USER www-data
CMD ["/usr/bin/run.sh"]