forked from ONLYOFFICE/Docker-CommunityServer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
100 lines (91 loc) · 4.62 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
FROM ubuntu:18.04
ARG RELEASE_DATE="2016-06-21"
ARG RELEASE_DATE_SIGN=""
ARG VERSION="8.9.0.190"
ARG SOURCE_REPO_URL="deb http://static.teamlab.com.s3.amazonaws.com/repo/debian squeeze main"
ARG DEBIAN_FRONTEND=noninteractive
ARG PACKAGE_SYSNAME="onlyoffice"
LABEL ${PACKAGE_SYSNAME}.community.release-date="${RELEASE_DATE}" \
${PACKAGE_SYSNAME}.community.version="${VERSION}" \
description="Community Server is a free open-source collaborative system developed to manage documents, projects, customer relationship and emails, all in one place." \
maintainer="Ascensio System SIA <support@${PACKAGE_SYSNAME}.com>" \
securitytxt="https://www.${PACKAGE_SYSNAME}.com/.well-known/security.txt"
ENV LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8
RUN apt-get -y update && \
apt-get -y upgrade && \
apt-get -y dist-upgrade && \
addgroup --system --gid 107 ${PACKAGE_SYSNAME} && \
adduser -uid 104 --quiet --home /var/www/${PACKAGE_SYSNAME} --system --gid 107 ${PACKAGE_SYSNAME} && \
addgroup --system --gid 104 elasticsearch && \
adduser -uid 103 --quiet --home /nonexistent --system --gid 104 elasticsearch && \
apt-get -yq install systemd \
systemd-sysv \
locales \
software-properties-common \
curl \
wget \
sudo && \
cd /lib/systemd/system/sysinit.target.wants/ && ls | grep -v systemd-tmpfiles-setup | xargs rm -f $1 && \
rm -f /lib/systemd/system/multi-user.target.wants/* \
/etc/systemd/system/*.wants/* \
/lib/systemd/system/local-fs.target.wants/* \
/lib/systemd/system/sockets.target.wants/*udev* \
/lib/systemd/system/sockets.target.wants/*initctl* \
/lib/systemd/system/basic.target.wants/* \
/lib/systemd/system/anaconda.target.wants/* \
/lib/systemd/system/plymouth* \
/lib/systemd/system/systemd-update-utmp* && \
locale-gen en_US.UTF-8 && \
echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
echo "${SOURCE_REPO_URL}" >> /etc/apt/sources.list && \
echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic/snapshots/6.8.0.123 main" | tee /etc/apt/sources.list.d/mono-official.list && \
echo "deb https://d2nlctn12v279m.cloudfront.net/repo/mono/ubuntu bionic main" | tee /etc/apt/sources.list.d/mono-extra.list && \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CB2DE8E5 && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF && \
wget http://nginx.org/keys/nginx_signing.key && \
apt-key add nginx_signing.key && \
echo "deb http://nginx.org/packages/ubuntu/ bionic nginx" >> /etc/apt/sources.list.d/nginx.list && \
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add - && \
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | tee -a /etc/apt/sources.list.d/elastic-7.x.list && \
add-apt-repository -y ppa:certbot/certbot && \
add-apt-repository -y ppa:chris-lea/redis-server && \
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - && \
apt-get install -yq gnupg2 \
ca-certificates \
software-properties-common \
cron \
rsyslog \
ruby-dev \
ruby-god \
nodejs \
nginx \
gdb \
mono-complete \
ca-certificates-mono \
python-certbot-nginx \
htop \
nano \
dnsutils \
redis-server \
python3-pip \
multiarch-support \
iproute2 \
ffmpeg \
jq \
openjdk-8-jre-headless \
apt-transport-https \
elasticsearch=7.4.0 \
mono-webserver-hyperfastcgi=0.4-7 \
${PACKAGE_SYSNAME}-communityserver \
${PACKAGE_SYSNAME}-xmppserver && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY config /app/config/
COPY assets /app/assets/
COPY run-community-server.sh /app/run-community-server.sh
RUN chmod -R 755 /app/*.sh
VOLUME ["/sys/fs/cgroup","/var/log/${PACKAGE_SYSNAME}", "/var/www/${PACKAGE_SYSNAME}/Data", "/var/lib/mysql", "/etc/letsencrypt"]
EXPOSE 80 443 5222 3306 9865 9888 9866 9871 9882 5280
CMD ["/app/run-community-server.sh"];