ImageBuild: failed to compute cache key. when using ZFS as Storage Driver
Open
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 10.1k
- Forks
- 413
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 6
Description
Environment
Server Version: 19.03.8
Storage Driver: zfs
Kernel Version: 5.4.0-42-generic
Tilt.dev version: v0.17.2 (but also happens with older versions)
It only happens when using ZFS as storage driver.
Sample
https://github.com/sdelrio/tiltdev-issue-zfs
Dockerfiles used in tilt
- prometheus/Dockerfile
FROM prom/prometheus:v2.15.1
COPY prometheus.yml /etc/prometheus/prometheus.yml
- grafan/Dockerfile
FROM grafana/grafana
COPY --chown=grafana:grafana ./provisioning/ /etc/grafana/provisioning/%
Logs when tilt up
- Streamlog
Successfully loaded Tiltfile (230.373436ms)
prometheus │
prometheus │ Initial Build • prometheus
prometheus │ STEP 1/1 — Building Dockerfile: [tilt.dev/prometheus]
prometheus │ Building Dockerfile:
prometheus │ FROM prom/prometheus:v2.15.1
prometheus │
prometheus │ COPY prometheus.yml /etc/prometheus/prometheus.yml
prometheus │
prometheus │
prometheus │
prometheus │ Tarring context…
prometheus │ Building image
grafana │
grafana │ Initial Build • grafana
grafana │ STEP 1/1 — Building Dockerfile: [tilt.dev/grafana]
grafana │ Building Dockerfile:
grafana │ FROM grafana/grafana
grafana │
grafana │ COPY --chown=grafana:grafana ./provisioning/ /etc/grafana/provisioning/
grafana │
grafana │ Tarring context…
grafana │ Building image
prometheus │ copy /context /
grafana │ copy /context /
grafana │ copy /context / [done: 229ms]
prometheus │ copy /context / [done: 272ms]
grafana │ [1/2] FROM docker.io/grafana/grafana@sha256:d984df30a059aa8a4782f3cf316882c38a1a509b4ef83132658301d7a53761ee
grafana │ [2/2] COPY --chown=grafana:grafana ./provisioning/ /etc/grafana/provisioning/
grafana │
grafana │ ERROR IN: [2/2] COPY --chown=grafana:grafana ./provisioning/ /etc/grafana/provisioning/
grafana │
grafana │ got unexpected error during build/deploy: ImageBuild: failed to compute cache key: failed to mount /var/lib/docker/tmp/buildkit-mount018555909: [{Type:bind Source:/var/lib/docker/zfs/graph/vag0xqoutppmvli7u640kbpjh Options:[rbind ro]}]: no such file or directory
grafana │ ERROR: Build Failed: ImageBuild: failed to compute cache key: failed to mount /var/lib/docker/tmp/buildkit-mount018555909: [{Type:bind Source:/var/lib/docker/zfs/graph/vag0xqoutppmvli7u640kbpjh Options:[rbind ro]}]: no such file or directory
prometheus │ [1/2] FROM docker.io/prom/prometheus:v2.15.1@sha256:169b743ceb4452266915272f9c3409d36972e41cb52f3f28644e6c0609fc54e6
prometheus │ [2/2] COPY prometheus.yml /etc/prometheus/prometheus.yml
prometheus │
prometheus │ ERROR IN: [2/2] COPY prometheus.yml /etc/prometheus/prometheus.yml
prometheus │
prometheus │ got unexpected error during build/deploy: ImageBuild: failed to compute cache key: failed to mount /var/lib/docker/tmp/buildkit-mount052540832: [{Type:bind Source:/var/lib/docker/zfs/graph/qjkwdftokr44yhvmoh0fec30r Options:[rbind ro]}]: no such file or directory
prometheus │ ERROR: Build Failed: ImageBuild: failed to compute cache key: failed to mount /var/lib/docker/tmp/buildkit-mount052540832: [{Type:bind Source:/var/lib/docker/zfs/graph/qjkwdftokr44yhvmoh0fec30r Options:[rbind ro]}]: no such file or directory
When DOCKER_BUILKIT is disabled
When DOCKER_BUILDKIT=0 tilt up It builds correctly
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked sample and the prometheus/Dockerfile and grafan/Dockerfile under the reported ZFS storage-driver environment. Reproduce the BuildKit failure with tilt up, then compare it with DOCKER_BUILDKIT=0; done means both Dockerfiles build successfully with BuildKit enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100