onlyoffice-ce-docker-license/Dockerfile
Alexander Hofbauer 1105492df0
Fix sed typo, consolidate patching
Wrong ordering created a backup copy we don't need.
2020-10-03 18:32:40 +02:00

39 lines
1.3 KiB
Docker

ARG oo_version=5.6.5.3
FROM onlyoffice/documentserver:$oo_version
ARG oo_version=5.6.5.3
RUN sed -si \
's/isSupportEditFeature:function(){return!1}/isSupportEditFeature:function(){return true}/g' \
/var/www/onlyoffice/documentserver/web-apps/apps/documenteditor/mobile/app.js \
/var/www/onlyoffice/documentserver/web-apps/apps/presentationeditor/mobile/app.js \
/var/www/onlyoffice/documentserver/web-apps/apps/spreadsheeteditor/mobile/app.js
# source patching and compilation
RUN apt-get update && apt-get install -y \
git \
curl \
&& curl -sL https://deb.nodesource.com/setup_10.x | bash - \
&& apt install -y nodejs \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir /build
WORKDIR /build
RUN git clone --branch v$oo_version --depth 1 https://github.com/ONLYOFFICE/server.git .
COPY license.patch /build/
RUN git apply license.patch
RUN npm install pkg grunt-cli \
&& make \
&& node_modules/.bin/pkg --targets=linux build/server/FileConverter \
&& node_modules/.bin/pkg --targets=linux build/server/DocService \
&& cp fileconverter /var/www/onlyoffice/documentserver/server/FileConverter/converter \
&& cp coauthoring /var/www/onlyoffice/documentserver/server/DocService/docservice
WORKDIR /
RUN rm -rf /build