failed to compute cache key: "/target/kroki-server.jar" not found: not found
See original GitHub issueWith fdf28d3 on macOS 11.4:
$ docker --version
Docker version 20.10.6, build 370c289
$ make buildDockerImages
[omit succeeding output]
docker build -f ops/docker/jdk11-alpine/Dockerfile -t yuzutech/kroki:jdk11-alpine -t yuzutech/kroki:jdk-11 -t yuzutech/kroki:latest .
[+] Building 4.4s (24/24) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.96kB 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/adoptopenjdk/openjdk11:jre-11.0.9.1_1-alpine 3.8s
=> [internal] load build context 0.0s
=> => transferring context: 595B 0.0s
=> FROM docker.io/library/kroki-builder-bytefield:latest 0.4s
=> FROM docker.io/library/kroki-builder-static-pikchr:latest 0.1s
=> FROM docker.io/library/kroki-builder-vega:latest 0.4s
=> FROM docker.io/library/kroki-builder-wavedrom:latest 0.5s
=> CANCELED [stage-0 1/13] FROM docker.io/adoptopenjdk/openjdk11:jre-11.0.9.1_1-alpine@sha256:b6ab039066382d39cfc843914ef1fc624aa6 0.0s
=> => resolve docker.io/adoptopenjdk/openjdk11:jre-11.0.9.1_1-alpine@sha256:b6ab039066382d39cfc843914ef1fc624aa60e2a16ede433509ccad 0.0s
=> => sha256:b6ab039066382d39cfc843914ef1fc624aa60e2a16ede433509ccadd6d995b1f 433B / 433B 0.0s
=> => sha256:961d26d00378688d5dd6bd4e00859f8fc9faaf33e2bf3cd528db8306e778287f 951B / 951B 0.0s
=> => sha256:28ad0c2768654c9a35decb239b301ad3453bed4b63416fa2490aabcf5eaeab30 7.23kB / 7.23kB 0.0s
=> FROM docker.io/library/kroki-builder-nomnoml:latest 0.4s
=> FROM docker.io/library/kroki-builder-static-erd:latest 0.2s
=> FROM docker.io/library/kroki-builder-static-svgbob:latest 0.5s
=> CACHED [stage-0 2/13] RUN addgroup -g 1000 kroki && adduser -D -G kroki -u 1000 kroki 0.0s
=> CACHED [stage-0 3/13] COPY --from=kroki-builder-static-svgbob:latest /home/rust/.cargo/bin/svgbob /usr/bin/svgbob 0.0s
=> CACHED [stage-0 4/13] COPY --from=kroki-builder-static-erd:latest /root/.local/bin/erd /usr/bin/erd 0.0s
=> CACHED [stage-0 5/13] COPY --from=kroki-builder-nomnoml:latest /app/app.bin /usr/bin/nomnoml 0.0s
=> CACHED [stage-0 6/13] COPY --from=kroki-builder-vega:latest /app/app.bin /usr/bin/vega 0.0s
=> CACHED [stage-0 7/13] COPY --from=kroki-builder-vega:latest /app/canvas.node /usr/bin/canvas.node 0.0s
=> CACHED [stage-0 8/13] COPY --from=kroki-builder-wavedrom:latest /app/app.bin /usr/bin/wavedrom 0.0s
=> CACHED [stage-0 9/13] COPY --from=kroki-builder-bytefield:latest /app/app.bin /usr/bin/bytefield 0.0s
=> CACHED [stage-0 10/13] COPY --from=kroki-builder-static-pikchr:latest /build/pikchr /usr/bin/pikchr 0.0s
=> CACHED [stage-0 11/13] RUN apk add --update --no-cache libjpeg giflib-dev graphviz t 0.0s
=> CACHED [stage-0 12/13] COPY --chown=kroki:kroki ops/docker/logback.xml /etc/kroki/logback.xml 0.0s
=> ERROR [stage-0 13/13] COPY --chown=kroki:kroki target/kroki-server.jar /usr/local/kroki/kroki-server.jar 0.0s
------
> [stage-0 13/13] COPY --chown=kroki:kroki target/kroki-server.jar /usr/local/kroki/kroki-server.jar:
------
failed to compute cache key: "/target/kroki-server.jar" not found: not found
make[1]: *** [package] Error 1
make: *** [buildDockerImages] Error 2
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
failed to compute cache key: not found - runs fine in Visual ...
Check your .dockerignore file. Possible it ignores needed files for copy command and you get failed to compute cache key error.
Read more >How to fix-Docker docker failed to compute cache key not ...
The Docker failed to compute cache key error is result of docker buildcommand which is executed on a directory where the Dockefile is...
Read more >Docker Error Failed To Compute Cache Key: Solution
The Docker failed to compute cache key problem occurs when the docker buildcommand is called in a directory that does not contain the...
Read more >Docker build giving failed to compute cache key: not found
I created Dockerfile which contains following code - FROM alpine/git as clone. WORKDIR /app
Read more >Dockerfile, getting "failed to compute cache key" in the build
... failed to compute cache key: "/home/thesonics/robot-shop/web/static" not found: not found ERROR: Service 'web' failed to build : Build ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello @SamuelMarks,
If you want to build the Docker image locally (from the source), you first need to build the
kroki-server.jar
file.Before running
make buildDockerImages
, you need to runmake installLocalDependencies
andmake buildServer
to compile and create a jar file from the Java sources.You can take a look at the GitHub Action workflow to know which tasks you need to run:
https://github.com/yuzutech/kroki/blob/fdf28d344c727304883250356a03688573bca3ba/.github/workflows/main.yaml#L54-L65
Kroki images are relatively small but Docker can consume a lot of space during build. I don’t have the exact number but it can grow quickly.
Keep us updated 😉 If you have multiple partitions or file systems, make sure that you have free space on them too. On my system (Linux), Docker is using
/var/lib/docker
.