-
Notifications
You must be signed in to change notification settings - Fork 21
/
Dockerfile
116 lines (101 loc) · 3.84 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# Nextcloud - Dockerfile
#
# @copyright Copyright (c) 2022 Arthur Schiwon ([email protected])
# @copyright Copyricht (c) 2018 Nico Gulden ([email protected])
# @copyright Copyright (c) 2017 Lukas Reschke ([email protected])
# @copyright Copyright (c) 2016 Marcos Zuriaga Miguel ([email protected])
# @copyright Copyright (c) 2016 Sander Brand ([email protected])
# @license GNU AGPL version 3 or any later version
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
FROM ubuntu:22.04
ADD https://download.nextcloud.com/server/releases/nextcloud-28.0.7.tar.bz2 /root/nextcloud.tar.bz2
ADD https://github.com/nextcloud-releases/richdocuments/releases/download/v8.3.8/richdocuments-v8.3.8.tar.gz /root/richdocuments.tar.gz
ADD https://github.com/ONLYOFFICE/onlyoffice-nextcloud/releases/download/v9.2.2/onlyoffice.tar.gz /root/onlyoffice.tar.gz
COPY resources/entrypoint.sh /usr/sbin/
COPY resources/60-nextcloud.ini /etc/php/8.1/apache2/conf.d/
COPY resources/60-nextcloud.ini /etc/php/8.1/cli/conf.d/
COPY resources/000-default.conf /etc/apache2/sites-enabled/
# uncomment and set to true if a patch nededs to be applied
#COPY resources/19439.patch /root/nc.patch
ENV NC_IS_PATCHED false
RUN /bin/bash -c "export DEBIAN_FRONTEND=noninteractive" && \
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \
apt-get -y update && apt-get -y full-upgrade
RUN /bin/bash -c "export DEBIAN_FRONTEND=noninteractive" && \
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \
apt-get -y update && apt-get -y full-upgrade && apt-get install -y \
apache2 \
cron \
curl \
libapache2-mod-php \
libfuse2 \
patch \
php \
php-bcmath \
php-curl \
php-dev \
php-gd \
php-imagick \
php-intl \
php-mbstring \
php-xml \
php-zip \
php-apcu \
php-ldap \
php-oauth \
php-pgsql \
php-gmp \
php-smbclient \
wget \
pwgen \
sudo \
lbzip2 \
libmagickcore-6.q16-6-extra \
libsmbclient-dev \
unattended-upgrades \
unzip
COPY resources/ldap.conf /etc/ldap/
RUN a2enmod headers
RUN a2enmod rewrite
RUN cd /root/ && \
tar -xf "nextcloud.tar.bz2" && \
mv /root/nextcloud/* /var/www/html/ && \
mv /root/nextcloud/.htaccess /var/www/html/ && \
mv /root/nextcloud/.user.ini /var/www/html/ && \
rm -Rf /root/nextcloud && \
rm "nextcloud.tar.bz2" && \
cd /var/www/html/ && \
chmod +x occ && \
chown -R www-data /var/www/html
RUN rm -Rf /var/www/html/apps/updatenotification
RUN cd /var/www/html/apps && \
mkdir richdocuments && \
tar -xf /root/richdocuments.tar.gz -C richdocuments --strip-components=1 && \
chown -R www-data:nogroup /var/www/html/apps/richdocuments && \
rm /root/richdocuments.tar.gz
RUN cd /var/www/html/apps && \
mkdir onlyoffice && \
tar -xf /root/onlyoffice.tar.gz -C onlyoffice --strip-components=1 && \
chown -R www-data:nogroup /var/www/html/apps/onlyoffice && \
rm /root/onlyoffice.tar.gz
RUN /bin/bash -c "export DEBIAN_FRONTEND=noninteractive" && \
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \
apt autoremove -y && apt clean
# uncomment and adjust following block if a patch needs to be applied
#RUN cd /var/www/html/ && \
# patch -p1 -t < /root/nc.patch && \
# rm /root/nc.patch
EXPOSE 80
ENTRYPOINT /usr/sbin/entrypoint.sh