[GH-ISSUE #506] docker-compose build failed #244

Closed
opened 2026-02-26 10:31:17 +03:00 by kerem · 8 comments
Owner

Originally created by @ottoking8912 on GitHub (Sep 30, 2022).
Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/506

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

Originally created by @ottoking8912 on GitHub (Sep 30, 2022). Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/506 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
kerem 2026-02-26 10:31:17 +03:00
Author
Owner

@cdugeai commented on GitHub (Sep 30, 2022):

This also happened to me on step 17/19 while building the image:

image

<!-- gh-comment-id:1263453583 --> @cdugeai commented on GitHub (Sep 30, 2022): This also happened to me on step `17/19` while building the image: ![image](https://user-images.githubusercontent.com/46027833/193260001-bdb71455-9aaa-4779-ad3b-9ed5c3d9cb0c.png)
Author
Owner

@rsuinux commented on GitHub (Oct 7, 2022):

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

<!-- gh-comment-id:1271697062 --> @rsuinux commented on GitHub (Oct 7, 2022): 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
Author
Owner

@ShockwaveNN commented on GitHub (Oct 7, 2022):

Thanks for noticing, something went wrong with ARGs in default dockerfile

I've created issue 59310 in our private issue tracker

<!-- gh-comment-id:1271766940 --> @ShockwaveNN commented on GitHub (Oct 7, 2022): Thanks for noticing, something went wrong with ARGs in default dockerfile I've created issue 59310 in our private issue tracker
Author
Owner

@rsuinux commented on GitHub (Oct 8, 2022):

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.

<!-- gh-comment-id:1272277871 --> @rsuinux commented on GitHub (Oct 8, 2022): 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.
Author
Owner

@downright-ux commented on GitHub (Oct 14, 2022):

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
<!-- gh-comment-id:1279319357 --> @downright-ux commented on GitHub (Oct 14, 2022): 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 ```
Author
Owner

@soulsymphonies commented on GitHub (Oct 16, 2022):

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 ;)

<!-- gh-comment-id:1279989996 --> @soulsymphonies commented on GitHub (Oct 16, 2022): 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 ;)
Author
Owner

@ShockwaveNN commented on GitHub (Oct 18, 2022):

This is fixed in https://github.com/ONLYOFFICE/Docker-DocumentServer/pull/508 and will be included in v7.2.1

<!-- gh-comment-id:1282919143 --> @ShockwaveNN commented on GitHub (Oct 18, 2022): This is fixed in https://github.com/ONLYOFFICE/Docker-DocumentServer/pull/508 and will be included in v7.2.1
Author
Owner

@ShockwaveNN commented on GitHub (Oct 21, 2022):

DocuemntServer v7.2.1 is released and this problem should be fixed

<!-- gh-comment-id:1287338781 --> @ShockwaveNN commented on GitHub (Oct 21, 2022): DocuemntServer v7.2.1 is released and this problem should be fixed
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Docker-DocumentServer-ONLYOFFICE#244
No description provided.