This commit is contained in:
Alexander Hofbauer 2020-12-27 21:02:07 +01:00
parent b9a687f4f9
commit a6e7e5dc2a
No known key found for this signature in database
GPG key ID: 6421CE3D34E74BA1
2 changed files with 65 additions and 93 deletions

View file

@ -1,10 +1,11 @@
ARG product_version=6.0.1
ARG build_number=32
ARG product_version=6.1.0
ARG build_number=83
FROM onlyoffice/documentserver:${product_version}.${build_number}
ARG product_version
ARG build_number
RUN sed -si \
's/isSupportEditFeature:function(){return!1}/isSupportEditFeature:function(){return true}/g' \
/var/www/onlyoffice/documentserver/web-apps/apps/documenteditor/mobile/app.js \
@ -12,17 +13,14 @@ RUN sed -si \
/var/www/onlyoffice/documentserver/web-apps/apps/spreadsheeteditor/mobile/app.js
# source patching and compilation
RUN apt update && apt install -y git curl \
&& curl -sL https://deb.nodesource.com/setup_10.x | bash - \
&& apt install -y nodejs \
&& rm -rf /var/lib/apt/lists/*
ARG build_deps="git make g++ nodejs npm"
RUN apt-get update && apt-get install -y ${build_deps}
ARG tag=v${product_version}.${build_number}
RUN mkdir /build \
&& git clone --quiet --branch $tag --depth 1 https://github.com/ONLYOFFICE/build_tools.git /build/build_tools \
&& git clone --quiet --branch $tag --depth 1 https://github.com/ONLYOFFICE/server.git /build/server
&& git clone --quiet --branch $tag --depth 1 https://github.com/ONLYOFFICE/build_tools.git /build/build_tools \
&& git clone --quiet --branch $tag --depth 1 https://github.com/ONLYOFFICE/server.git /build/server
COPY license.patch /build/
@ -37,9 +35,13 @@ RUN npm install -g pkg grunt grunt-cli \
&& pkg /build/build_tools/out/linux_64/onlyoffice/documentserver/server/FileConverter --targets=node10-linux -o /build/converter \
&& pkg /build/build_tools/out/linux_64/onlyoffice/documentserver/server/DocService --targets=node10-linux --options max_old_space_size=4096 -o /build/docservice \
&& cp /build/converter /var/www/onlyoffice/documentserver/server/FileConverter/converter \
&& cp /build/docservice /var/www/onlyoffice/documentserver/server/DocService/docservice \
&& npm uninstall -g pkg grunt grunt-cli \
&& rm -rf /root/.cache /root/.config/ /root/.npm/ /root/.pkg-cache \
&& rm -rf /build
&& cp /build/docservice /var/www/onlyoffice/documentserver/server/DocService/docservice
WORKDIR /
RUN npm uninstall -g pkg grunt grunt-cli \
&& apt-get purge -y --autoremove ${build_deps} \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& rm -rf /root/.cache /root/.config/ /root/.npm/ /root/.pkg-cache \
&& rm -rf /build