Docker DocumentServer build is failing

When I run the docker-compose.yml, I get the following error:

Setting up ca-certificates (20211016ubuntu0.22.04.1) ...
Updating certificates in /etc/ssl/certs...
124 added, 0 removed; done.
Setting up gpgconf (2.2.27-3ubuntu2.1) ...
Setting up gpg (2.2.27-3ubuntu2.1) ...
Setting up libpython3-stdlib:amd64 (3.10.6-1~22.04) ...
Setting up gnupg-utils (2.2.27-3ubuntu2.1) ...
Setting up gpg-agent (2.2.27-3ubuntu2.1) ...
Setting up python3.10 (3.10.6-1~22.04.2) ...
Setting up gpgsm (2.2.27-3ubuntu2.1) ...
Setting up python3 (3.10.6-1~22.04) ...
Setting up dirmngr (2.2.27-3ubuntu2.1) ...
Setting up gpg-wks-server (2.2.27-3ubuntu2.1) ...
Setting up lsb-release (11.1.0ubuntu4) ...
Setting up gpg-wks-client (2.2.27-3ubuntu2.1) ...
Setting up gnupg (2.2.27-3ubuntu2.1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
Processing triggers for ca-certificates (20211016ubuntu0.22.04.1) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
gpg: WARNING: unsafe permissions on homedir '/root/.gnupg'
gpg: keyring '/etc/apt/trusted.gpg.d/onlyoffice.gpg' created
gpg: keyserver receive failed: No data
ERROR: Service 'onlyoffice-documentserver' failed to build: The command '/bin/sh -c echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d &&     apt-get -y update &&     apt-get -yq install wget apt-transport-https gnupg locales lsb-release &&     mkdir -p $HOME/.gnupg &&     gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/onlyoffice.gpg --keyserver --recv-keys 0x8320ca65cb2de8e5 &&     chmod 644 /etc/apt/trusted.gpg.d/onlyoffice.gpg &&     locale-gen en_US.UTF-8 &&     echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections &&     wget -O - | bash &&     if [ $(lsb_release -cs) = focal ]; then RABBITMQ_VERSION=3.8.11-1; else RABBITMQ_VERSION=3.9 ; fi &&     apt-get -yq install         adduser         apt-utils         bomstrip         certbot         curl         gconf-service         htop         libasound2         libboost-regex-dev         libcairo2         libcurl3-gnutls         libcurl4         libgtk-3-0         libnspr4         libnss3         libstdc++6         libxml2         libxss1         libxtst6         mysql-client         nano         net-tools         netcat-openbsd         nginx-extras         postgresql         postgresql-client         pwgen         rabbitmq-server=${RABBITMQ_VERSION}*         redis-server         software-properties-common         sudo         supervisor         ttf-mscorefonts-installer         xvfb         zlib1g &&     if [  $(ls -l /usr/share/fonts/truetype/msttcorefonts | wc -l) -ne 61 ];         then echo 'msttcorefonts failed to download'; exit 1; fi  &&     echo "SERVER_ADDITIONAL_ERL_ARGS=\"+S 1:1\"" | tee -a /etc/rabbitmq/rabbitmq-env.conf &&     sed -i "s/bind .*/bind" /etc/redis/redis.conf &&     sed 's|\(application\/zip.*\)|\1\n    application\/wasm wasm;|' -i /etc/nginx/mime.types &&     pg_conftool $PG_VERSION main set listen_addresses 'localhost' &&     service postgresql restart &&     sudo -u postgres psql -c "CREATE DATABASE $ONLYOFFICE_VALUE;" &&     sudo -u postgres psql -c "CREATE USER $ONLYOFFICE_VALUE WITH password '$ONLYOFFICE_VALUE';" &&     sudo -u postgres psql -c "GRANT ALL privileges ON DATABASE $ONLYOFFICE_VALUE TO $ONLYOFFICE_VALUE;" &&     service postgresql stop &&     service redis-server stop &&     service rabbitmq-server stop &&     service supervisor stop &&     service nginx stop &&     rm -rf /var/lib/apt/lists/*' returned a non-zero code: 2

Hello @privnote42

We are aware of this issue. It will be fixed in the next hotfix.
As for now, as a workaround you can install Document Server with Docker:

Apologies for the inconvenience caused.

Hi I managed this issue by removing the following line from Dockerfile file.

apt-key adv --keyserver --recv-keys 0x8320ca65cb2de8e5 && \

Unfortunally I got a new one:

Installing plugins, please wait…Done
error: <class ‘FileNotFoundError’>, [Errno 2] No such file or directory: file: /usr/lib/python3/dist-packages/supervisor/ line: 560
dpkg: error processing package onlyoffice-documentserver (–configure):
installed onlyoffice-documentserver package post-installation script subprocess returned error exit status 1

Any ideas plz?

Best regard.


This issue that you are facing differs from the one of this thread. I can see that you’ve also posted two times in other thread:

Please do not duplicate questions in several threads.

Hi @Constantine apologise, I noted.
Can you lead me through this issue please?

Best regards.

Share a link to the guide that you are using to install Document Server and, eventually, getting mentioned error.
Also, specify version of Docker. You can check it by running docker -v command, share the output of it…

Hi please find below the guide
Installing ONLYOFFICE Docs for Docker on a local server - ONLYOFFICE

and versions informations
docker-compose version 1.25.1, build a82fef0
Version: 20.10.9-ce
API version: 1.41
Go version: go1.16.8
Git commit: 79ea9d308018
Built: Wed Oct 6 12:00:00 2021
OS/Arch: linux/amd64
Context: default
Experimental: true

Version: 20.10.9-ce
API version: 1.41 (minimum version 1.12)
Go version: go1.16.8
Git commit: 79ea9d308018
Built: Wed Oct 6 12:00:00 2021
OS/Arch: linux/amd64
Experimental: false
Version: v1.4.11
GitCommit: 5b46e404f6b9f661a205e28d59c982d3634148f8
Version: 1.0.3
Version: 0.1.5_catatonit

I made some progress by modifying several lines in the compose file (port a.b.c.d:8443:80)

Now I can UP but I am confidente in that setting. Let me know please.

Best regard.

Thanks for the info.
Try updating your Docker to the version 23 or higher and then try starting up containers with non-edited .yml as per the guide you’ve mentioned.

Unfortunately I have to stick with the following setup

LSB Version: n/a
Distributor ID: openSUSE
Description: openSUSE Leap 15.2
Release: 15.2
Codename: n/a

and nextcloud 19 (connector 6.4.2). Do you know a compatible rpm repository for docker 23?

I have to inform you that we haven’t tested Document Server installation on OpenSUSE, hence we cannot provide any recommendations in regard of set up in this environment.

In general, we are not providing support for the old versions of ONLYOFFICE products, including connector apps. With that said, keep in mind that latest version of the connector app does not support version 19 of Nextcloud.

I would recommend you to update your connector app to the latest version as well as Nextcloud. Also, update Docker to the recommended version 23 or higher to successfully install Document Server with Docker Compose.

Thank you I got it. Is it wise to try compilation instead of the Docker installation in that situation? Any chances to get the compilation done on Intel(R) Pentium(R) CPU G2020 @ 2.90GHz ? Compiling ONLYOFFICE Docs for a local server - ONLYOFFICE

Best regards.

I think it is easier to install with packages instead of compiling: