Arm64 #1

Merged
jiriks74 merged 2 commits from arm64 into master 2022-03-09 18:59:08 +01:00
2 changed files with 50 additions and 13 deletions

@ -1,7 +1,12 @@
FROM ubuntu:20.04 FROM debian:latest
LABEL maintainer Ascensio System SIA <support@onlyoffice.com> LABEL maintainer="jiriks74"
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive PG_VERSION=12 RUN echo "deb http://deb.debian.org/debian bullseye main contrib non-free\ndeb http://deb.debian.org/debian-security/ bullseye-security main contrib non-free\ndeb http://deb.debian.org/debian bullseye-updates main contrib non-free\ndeb http://deb.debian.org/debian bullseye-backports main" > /etc/apt/sources.list
RUN mkdir /build
RUN cd /build
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive PG_VERSION=13
ARG ONLYOFFICE_VALUE=onlyoffice ARG ONLYOFFICE_VALUE=onlyoffice
@ -31,7 +36,7 @@ RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
libxml2 \ libxml2 \
libxss1 \ libxss1 \
libxtst6 \ libxtst6 \
mysql-client \ mariadb-client \
nano \ nano \
net-tools \ net-tools \
netcat-openbsd \ netcat-openbsd \
@ -61,8 +66,42 @@ RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
service redis-server stop && \ service redis-server stop && \
service rabbitmq-server stop && \ service rabbitmq-server stop && \
service supervisor stop && \ service supervisor stop && \
service nginx stop && \ service nginx stop
rm -rf /var/lib/apt/lists/*
RUN apt install qemu binfmt-support qemu-user-static -t bullseye-backports -y
RUN dpkg --add-architecture amd64
RUN apt update && apt install libgcc-s1 libgcc-s1:amd64 -y
RUN cd /build && apt download libc6:amd64
RUN dpkg-deb -R /build/libc6*.deb /build/libc6
RUN sed -i 's/^Package: libc6$/Package: libc6-amd64/' /build/libc6/DEBIAN/control
RUN sed -i 's/^Depends: libgcc-s1, libcrypt1$/#Depends: libgcc-s1, libcrypt1/' /build/libc6/DEBIAN/control
RUN rm -rf /build/libc6/usr/share/doc
RUN rm -rf /build/libc6/usr/share/lintian
RUN dpkg-deb -b /build/libc6 /build/libc6-modified.deb
RUN dpkg -i /build/libc6-modified.deb
RUN cd /build && apt download libstdc++6:amd64
RUN dpkg-deb -R /build/libstdc++6*.deb /build/stdc
RUN sed -i 's/^Depends: gcc-10-base (= 10.2.1-6), libc6 (>= 2.23), libgcc-s1 (>= 4.2)$/#Depends: gcc-10-base (= 10.2.1-6), libc6 (>= 2.23), libgcc-s1 (>= 4.2)/' /build/stdc/DEBIAN/control
RUN dpkg-deb -b /build/stdc /build/libstdc++6-modified.deb
RUN dpkg -i /build/libstdc++6-modified.deb
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CB2DE8E5
RUN echo "deb https://download.onlyoffice.com/repo/debian squeeze main" | tee /etc/apt/sources.list.d/onlyoffice.list
RUN cd /build && apt update && apt download onlyoffice-documentserver:amd64
RUN dpkg-deb -R /build/onlyoffice-documentserver*.deb /build/onlyoffice
RUN sed -i 's/^Depends: debconf (>= 0.5) | debconf-2.0, adduser, ca-certificates, coreutils, curl, libasound2, libcairo2, libcurl3 | libcurl4, libcurl3-gnutls, libgconf-2-4, libgtk-3-0, libstdc++6 (>= 4.8.4), libxml2, libxss1, libxtst6, logrotate, mysql-client | mariadb-client, nginx-extras (>= 1.3.13), postgresql-client (>= 9.1), pwgen, supervisor (>= 3.0b2), xvfb, zlib1g$/Depends: debconf:arm64 (>= 0.5) | debconf-2.0:arm64, adduser:arm64, ca-certificates:arm64, coreutils:arm64, curl:arm64, libasound2:arm64, libcairo2:arm64, libcurl3:arm64 | libcurl4:arm64, libcurl3-gnutls:arm64, libgconf-2-4:arm64, libgtk-3-0:arm64, libstdc++6:amd64 (>= 4.8.4), libxml2:arm64, libxss1:arm64, libxtst6:arm64, logrotate:arm64, mysql-client:arm64 | mariadb-client:arm64, nginx-extras:arm64 (>= 1.3.13), postgresql-client:arm64 (>= 9.1), pwgen:arm64, supervisor:all (>= 3.0b2), xvfb:arm64, zlib1g:arm64/' /build/onlyoffice/DEBIAN/control
RUN dpkg-deb -b /build/onlyoffice /build/onlyoffice-documentserver-modified.deb
COPY config /app/ds/setup/config/ COPY config /app/ds/setup/config/
COPY run-document-server.sh /app/ds/run-document-server.sh COPY run-document-server.sh /app/ds/run-document-server.sh
@ -75,15 +114,13 @@ ARG PACKAGE_URL="http://download.onlyoffice.com/install/documentserver/linux/${C
ENV COMPANY_NAME=$COMPANY_NAME \ ENV COMPANY_NAME=$COMPANY_NAME \
PRODUCT_NAME=$PRODUCT_NAME PRODUCT_NAME=$PRODUCT_NAME
RUN wget -q -P /tmp "$PACKAGE_URL" && \ RUN service postgresql start && \
apt-get -y update && \ apt-get -yq install /build/onlyoffice-documentserver-modified.deb && \
service postgresql start && \
apt-get -yq install /tmp/$(basename "$PACKAGE_URL") && \
service postgresql stop && \ service postgresql stop && \
service supervisor stop && \ service supervisor stop && \
chmod 755 /app/ds/*.sh && \ chmod 755 /app/ds/*.sh && \
rm -f /tmp/$(basename "$PACKAGE_URL") && \ rm -rf /build/ && \
rm -rf /var/log/$COMPANY_NAME && \ rm -rf /var/log/$COMPANY_NAME && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*

@ -24,7 +24,7 @@ services:
- '443:443' - '443:443'
stdin_open: true stdin_open: true
restart: always restart: always
stop_grace_period: 60s stop_grace_period: 120s
volumes: volumes:
- /var/www/onlyoffice/Data - /var/www/onlyoffice/Data
- /var/log/onlyoffice - /var/log/onlyoffice