libreofficedocker / unoserver-rest-api

The simple REST API for unoserver
Apache License 2.0
21 stars 4 forks source link

Docker build fails for unoserver API build #1

Closed jan-macek closed 1 year ago

jan-macek commented 1 year ago

When I try and fix the lines 76-84 of the Docker file to correct filenames from the releases to the following:

# Uncomment the following line to
# Enable REST API for unoserver
ARG UNOSERVER_REST_API_VERSION=0.6.1
ADD https://github.com/libreoffice-docker/unoserver-rest-api/releases/download/v${UNOSERVER_REST_API_VERSION}/unoserver-rest-api-darwin /tmp
ADD https://github.com/libreoffice-docker/unoserver-rest-api/releases/download/v${UNOSERVER_REST_API_VERSION}/unoserver-rest-api-darwin.sha256 /tmp
RUN cd /tmp && sha256sum -c *.sha256 && \
    tar -C / -Jxpf /tmp/unoserver-rest-api-darwin && \
    rm -rf /tmp/*.tar*
EXPOSE 2004

the docker build still fails with following error:

jan$ docker build . -f Dockerfile -t libreoffice-unoserver
[+] Building 1.1s (25/27)                                                                                                                             
 => [internal] load build definition from Dockerfile                                                                                             0.0s
 => => transferring dockerfile: 3.07kB                                                                                                           0.0s
 => [internal] load .dockerignore                                                                                                                0.0s
 => => transferring context: 2B                                                                                                                  0.0s
 => [internal] load metadata for docker.io/library/alpine:3.16                                                                                   0.4s
 => [internal] load build context                                                                                                                0.0s
 => => transferring context: 722B                                                                                                                0.0s
 => https://github.com/just-containers/s6-overlay/releases/download/v3.1.1.2/s6-overlay-noarch.tar.xz.sha256                                     0.3s
 => https://github.com/just-containers/s6-overlay/releases/download/v3.1.1.2/s6-overlay-x86_64.tar.xz.sha256                                     0.3s
 => https://github.com/libreoffice-docker/unoserver-rest-api/releases/download/v0.6.1/unoserver-rest-api-darwin.sha256                           0.1s
 => https://github.com/libreoffice-docker/unoserver-rest-api/releases/download/v0.6.1/unoserver-rest-api-darwin                                  0.1s
 => https://github.com/just-containers/s6-overlay/releases/download/v3.1.1.2/s6-overlay-x86_64.tar.xz                                            0.1s
 => https://github.com/just-containers/s6-overlay/releases/download/v3.1.1.2/s6-overlay-noarch.tar.xz                                            0.1s
 => [ 1/17] FROM docker.io/library/alpine:3.16@sha256:b95359c2505145f16c6aa384f9cc74eeff78eb36d308ca4fd902eeeb0a0b161b                           0.0s
 => CACHED [ 2/17] RUN set -xe     ; apk update     ; apk add --no-cache --purge -uU         bash curl tzdata         freetype freetype-dev      0.0s
 => CACHED [ 3/17] RUN set -xe     ; apk update     ; apk add --no-cache --purge -uU         openjdk11-jre         openjdk11-jre-headless     ;  0.0s
 => CACHED [ 4/17] RUN set -xe     ; apk update     ; apk add --no-cache --purge -uU         ttf-dejavu         msttcorefonts-installer     ; r  0.0s
 => CACHED [ 5/17] RUN set -xe     ; apk update     ; apk add --no-cache         libreoffice-common         libreoffice-impress         libreof  0.0s
 => CACHED [ 6/17] RUN python3 --version     ; ln -s /usr/bin/python3 /usr/bin/python     ; python3 -m ensurepip     ; pip3 install --no-cache   0.0s
 => CACHED [ 7/17] RUN pip3 install --no-cache unoserver                                                                                         0.0s
 => CACHED [ 8/17] ADD https://github.com/just-containers/s6-overlay/releases/download/v3.1.1.2/s6-overlay-noarch.tar.xz /tmp                    0.0s
 => CACHED [ 9/17] ADD https://github.com/just-containers/s6-overlay/releases/download/v3.1.1.2/s6-overlay-noarch.tar.xz.sha256 /tmp             0.0s
 => CACHED [10/17] ADD https://github.com/just-containers/s6-overlay/releases/download/v3.1.1.2/s6-overlay-x86_64.tar.xz /tmp                    0.0s
 => CACHED [11/17] ADD https://github.com/just-containers/s6-overlay/releases/download/v3.1.1.2/s6-overlay-x86_64.tar.xz.sha256 /tmp             0.0s
 => CACHED [12/17] RUN cd /tmp && sha256sum -c *.sha256 &&     tar -C / -Jxpf /tmp/s6-overlay-noarch.tar.xz &&     tar -C / -Jxpf /tmp/s6-overl  0.0s
 => CACHED [13/17] ADD https://github.com/libreoffice-docker/unoserver-rest-api/releases/download/v0.6.1/unoserver-rest-api-darwin /tmp          0.0s
 => CACHED [14/17] ADD https://github.com/libreoffice-docker/unoserver-rest-api/releases/download/v0.6.1/unoserver-rest-api-darwin.sha256 /tmp   0.0s
 => ERROR [15/17] RUN cd /tmp && sha256sum -c *.sha256 &&     tar -C / -Jxpf /tmp/unoserver-rest-api-darwin &&     rm -rf /tmp/*.tar*            0.3s
------
 > [15/17] RUN cd /tmp && sha256sum -c *.sha256 &&     tar -C / -Jxpf /tmp/unoserver-rest-api-darwin &&     rm -rf /tmp/*.tar*:
#24 0.303 unoserver-rest-api-darwin: OK
#24 0.304 tar: short read
------
executor failed running [/bin/sh -c cd /tmp && sha256sum -c *.sha256 &&     tar -C / -Jxpf /tmp/unoserver-rest-api-darwin &&     rm -rf /tmp/*.tar*]: exit code: 1

Could you pls suggest what is wrong/how to correct this?

Thx, JM

jan-macek commented 1 year ago

Ok, I obviously had to open an issue to find the problem that I caused in my code 😇