docker-compose build failed
I've just cloned the repo and started the docker-compose up command without -d to see the actual output. Currently it stops with the following error msg:
The command '/bin/sh -c wget -q -P /tmp "$PACKAGE_BASEURL/$PACKAGE_FILE" && apt-get -y update && service postgresql start && apt-get -yq install /tmp/$PACKAGE_FILE && service postgresql stop && service supervisor stop && chmod 755 /app/ds/.sh && rm -f /tmp/$PACKAGE_FILE && rm -rf /var/log/$COMPANY_NAME && rm -rf /var/lib/apt/lists/' returned a non-zero code: 8 ERROR: Service 'onlyoffice-documentserver' failed to build : Build failed
Host Operating System: Ubuntu 22.04.1 LTS VM
This also happened to me on step 17/19 while building the image:

Hello all, Same problem. After modifying the DockerFile in order to tests, the problem (in my case) comes from the following line: The command '/bin/sh -c wget -q -P /tmp "$PACKAGE_BASEURL/$PACKAGE_FILE"' returned a non-zero code: 8 Debian/stable Linux server. docker version: Client: Docker Engine - Community Version: 20.10.18 API version: 1.41 Go version: go1.18.6 Git commit: b40c2f6 Built: Thu Sep 8 23:12:20 2022 OS/Arch: linux/amd64 Context: default Experimental: true
Server: Docker Engine - Community Engine: Version: 20.10.18 API version: 1.41 (minimum version 1.12) Go version: go1.18.6 Git commit: e42327a Built: Thu Sep 8 23:10:02 2022 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.6.8 GitCommit: 9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6 runc: Version: 1.1.4 GitCommit: v1.1.4-0-g5fd4c4d docker-init: Version: 0.19.0 GitCommit: de40ad0
docker-compose version: docker-compose version docker-compose version 1.29.1, build c34c88b2 docker-py version: 5.0.0 CPython version: 3.7.10 OpenSSL version: OpenSSL 1.1.0l Sep 10, 2019
Thanks for your help
Thanks for noticing, something went wrong with ARGs in default dockerfile
I've created issue 59310 in our private issue tracker
Hello, After some tests, here is a solution to work around this problem (I don't know if it's very safe) A few comments:
- the PACKAGE_VERSION variable set to "0.0.0-0" does not seem to be used for downloading
- the TARGETARCH variable is not initialized: I set it to amd64 in the Dockerfile at home (maybe it had to be done externally?) then I midified PACKAGE_FILE to remove extra '_'
And there, I did not have any more error (in the end, not for that described in this bug).
Cordially.
Here is the build fail I'm getting
failed to solve: executor failed running [/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 && mkdir -p $HOME/.gnupg && gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/onlyoffice.gpg --keyserver keyserver.ubuntu.com --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 && 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 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 127.0.0.1/g" /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/*]: exit code: 2
it didn't work for me either, but the following workaround actually works, setting these two values for the arguments in the Dockerfile allowed me to build:
PACKAGE_VERSION=7.2.0 TARGETARCH=amd64
maybe this helps someone else as well ;)
This is fixed in https://github.com/ONLYOFFICE/Docker-DocumentServer/pull/508 and will be included in v7.2.1
DocuemntServer v7.2.1 is released and this problem should be fixed