forked from tiredofit/docker-collabora-online
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.alpine
173 lines (167 loc) · 6.16 KB
/
Dockerfile.alpine
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
FROM tiredofit/alpine:3.18 as builder
LABEL maintainer="Dave Conroy (dave at tiredofit dot ca)"
LABEL org.opencontainers.image.source="https://github.com/tiredofit/docker-collabora-online"
### Buildtime arguments
ARG COLLABORA_ONLINE_VERSION
ARG COLLABORA_ONLINE_REPO_URL
ARG LIBREOFFICE_VERSION
ARG LIBREOFFICE_REPO_URL
ARG MAX_CONNECTIONS
ARG MAX_DOCUMENTS
ARG APP_NAME
ARG APP_BRAND
### Environment Variables
ENV COLLABORA_ONLINE_VERSION=${COLLABORA_ONLINE_VERSION:-"cp-23.05.0-2"} \
COLLABORA_ONLINE_REPO_URL=${COLLABORA_ONLINE_REPO_URL:-"https://github.com/CollaboraOnline/online"} \
#
LIBREOFFICE_VERSION=${LIBREOFFICE_VERSION:-"cp-23.05.0-2"} \
LIBREOFFICE_REPO_URL=${LIBREOFFICE_REPO_URL:-"https://github.com/LibreOffice/core"} \
#
APP_NAME=${APP_NAME:-"Document Editor"} \
APP_BRAND=${APP_BRAND:-"unbranded"} \
#
POCO_VERSION=${POCO_VERSION:-"poco-1.12.4-release.tar.gz"} \
POCO_URL=${POCO_URL:-"https://github.com/pocoproject/poco/archive/"} \
#
MAX_CONNECTIONS=${MAX_CONNECTIONS:-"100000"} \
## Uses Approximately 20mb per document open
MAX_DOCUMENTS=${MAX_DOCUMENTS:-"100000"}
COPY build-assets /build-assets
RUN source /assets/functions/00-container && \
set -x && \
package update && \
package upgrade && \
package install .container-build-deps \
build-base \
git \
&& \
package install .collabora-office-build-deps \
abseil-cpp-dev \
apache-ant \
autoconf \
automake \
bison \
bluez-dev \
boost-dev \
box2d-dev \
clang \
clucene-dev \
coreutils \
cppunit-dev \
cups-dev \
doxygen \
findutils \
flex \
freetype-dev \
glew-dev \
glm-dev \
glu-dev \
gperf \
gpgme-dev \
gst-plugins-base-dev \
gstreamer-dev \
gtk+3.0-dev \
gtk4.0-dev \
harfbuzz-dev \
hunspell-dev \
hyphen-dev \
icu-dev \
junit \
kconfig-dev \
lcms2-dev \
libabw-dev \
libcdr-dev \
libe-book-dev \
libepubgen-dev \
libetonyek-dev \
libexttextcat-dev \
libfreehand-dev \
libjpeg-turbo-dev \
libmspub-dev \
libmwaw-dev \
libnumbertext-dev \
libodfgen-dev \
liborcus-dev \
libpagemaker-dev \
libpq-dev \
libqxp-dev \
libstaroffice-dev \
libvisio-dev \
libwebp-dev \
libwpd-dev \
libwpg-dev \
libwps-dev \
libxml2-utils \
libxrandr-dev \
libxrender-dev \
libxslt-dev \
libzmf-dev \
llvm-dev \
mariadb-dev \
mdds-dev \
mythes-dev \
neon-dev \
nss-dev \
openjpeg-dev \
openldap-dev \
openssl-dev \
perl \
perl-archive-zip \
plasma-framework-dev \
poppler-dev \
py3-setuptools \
python3-dev \
qt5-qtbase-dev \
qt5-qttools-dev \
qt6-qtbase-dev \
qt6-qttools-dev \
redland-dev \
sed \
tar \
unixodbc-dev \
vigra-dev \
xmlsec-dev \
xz \
zip \
&& \
\
### Build Poco
mkdir -p /usr/src/poco && \
curl -sSL ${POCO_URL}${POCO_VERSION} | tar xvfz - --strip 1 -C /usr/src/poco && \
cd /usr/src/poco && \
./configure \
--static \
--no-tests \
--no-samples \
--no-sharedlibs \
--cflags="-fPIC" \
--omit=Zip,Data,Data/SQLite,Data/ODBC,Data/MySQL,MongoDB,PDF,CppParser,PageCompiler,Redis,Encodings \
--prefix=/opt/poco \
&& \
make -j$(nproc) && \
make install && \
\
### Build Fetch LibreOffice - This will take a while..
clone_git_repo ${LIBREOFFICE_REPO_URL} ${LIBREOFFICE_VERSION} ${GIT_REPO_SRC_CORE}
RUN source /assets/functions/00-container && \
set -x && \
GIT_REPO_SRC_CORE=/usr/src/core && \
adduser -D -S -h /dev/null -s /sbin/nologin -u 1000 cool && \
cd /usr/src/core && \
if [ -d "/build-assets/core/src" ] && [ -n "$(ls -A "/build-assets/core/src" 2>/dev/null)" ]; then cp -R /build-assets/core/src/* / ; fi; \
if [ -d "/build-assets/core/scripts" ] && [ -n "$(ls -A "/build-assets/core/scripts" 2>/dev/null)" ]; then for script in /build-assets/core/scripts/*.sh; do echo "** Applying $script"; bash $script; done && \ ; fi ; \
sed -i "s|--enable-symbols|--disable-symbols|g" ${GIT_REPO_SRC_CORE}/distro-configs/CPLinux-LOKit.conf && \
\
echo "--prefix=/opt/libreoffice" >> ${GIT_REPO_SRC_CORE}/distro-configs/CPLinux-LOKit.conf && \
./autogen.sh \
--with-distro="CPLinux-LOKit" \
--disable-epm \
--without-package-format && \
chown -R cool ${GIT_REPO_SRC_CORE} && \
sudo -u cool make fetch
RUN source /assets/functions/00-container && \
set -x && \
sudo -u cool make -j$(nproc) build && \
mkdir -p /opt/libreoffice && \
chown -R cool /opt/libreoffice && \
cp -R ${GIT_REPO_SRC_CORE}/instdir/* /opt/libreoffice/