-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
47 lines (39 loc) · 1.63 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:vivid
MAINTAINER Cosku Bas <[email protected]>
CMD ["/start.sh"]
# Install necessary packages
RUN apt-get update -y && apt-get install -y \
supervisor cron sudo bzip2 nginx wget php5-apcu php5-ldap php5-cli \
php5-fpm php5-mysql php5-gd php5-mcrypt php5-json php5-curl php5-intl \
php5-imagick php5-imap php5-gmp
# Copy configs and scripts
COPY configs/php.ini.fpm /etc/php5/fpm/php.ini
COPY configs/php.ini.cli /etc/php5/cli/php.ini
COPY configs/default /etc/nginx/sites-available/default
COPY configs/nginx.conf /etc/nginx/nginx.conf
COPY configs/www.conf /etc/php5/fpm/pool.d/www.conf
COPY configs/owncloud.cron /owncloud
COPY configs/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY scripts/configure_owncloud.php /settings.php
COPY scripts/install.sh /install.sh
COPY scripts/fix_perms.sh /fix_perms.sh
COPY scripts/start.sh /start.sh
RUN chmod +x /start.sh
# Configure cron
RUN crontab -u www-data /owncloud
RUN rm -f /owncloud
# Deploy ownCloud files
RUN wget https://download.owncloud.org/community/owncloud-8.1.1.tar.bz2
RUN tar -jxvf owncloud-8.1.1.tar.bz2 -C /usr/share/nginx/html/
RUN rm -f owncloud-8.1.1.tar.bz2
RUN rm -Rf /usr/share/nginx/html/owncloud/core/skeleton/*
RUN mkdir /usr/share/nginx/html/owncloud/assets
RUN mkdir /usr/share/nginx/html/owncloud/logs
RUN mkdir /var/lib/owncloud
RUN chown -Rf www-data:www-data /var/lib/owncloud
RUN chown -Rf www-data:www-data /usr/share/nginx/html/owncloud
COPY configs/htaccess /usr/share/nginx/html/owncloud/.htaccess
# Clean up APT when done.
RUN apt-get remove --purge -y wget bzip2
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
EXPOSE 80 443