Skip to content
/ buildx Public
  • Notifications You must be signed in to change notification settings
  • Fork 441
  • Star 3.3k
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jump to bottom

[bug] Error: failed to solve: rpc error: code = Unknown desc = content digest sha256:...: not found #101

Closed
shykes opened this issue Jul 8, 2019 · 23 comments 路 Fixed by moby/buildkit#1077
Closed

[bug] Error: failed to solve: rpc error: code = Unknown desc = content digest sha256:...: not found #101

shykes opened this issue Jul 8, 2019 · 23 comments 路 Fixed by moby/buildkit#1077
Labels
kind/bug Something isn't working

Comments

@shykes
Copy link
Contributor

shykes commented Jul 8, 2019

Summary

This error occurs randomly, and causes a build to fail when otherwise it would have succeeded. On re-running the exact same build, the error goes away.

Environment

docker-buildx version: standalone binary downloaded from https://github.com/docker/buildx/releases/download/v0.2.2/buildx-v0.2.2.linux-amd64 (sha256 5c31e171440213bb7fffd023611b1aaa7e0498162c54cb708c2a8abe3679717e)

Docker engine version:

Server: Docker Engine - Community
 Engine:
  Version:          18.09.6
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.8
  Git commit:       481bc77
  Built:            Sat May  4 01:59:36 2019
  OS/Arch:          linux/amd64
  Experimental:     false

How to reproduce

Unfortunately, I have not found a way to reproduce it reliably. However it does not seem to be related to the contents of the Dockerfile, since I have reproduced it (accidentally) with two completely unrelated Dockerfiles.

Based on my understanding of the error message, it appears that --load is required to reproduce.

Here is the output of the most recent occurrence:

+ /home/sh/bin/docker-buildx build --load --build-arg user=sh --build-arg uid=1002 --build-arg docker_guid=999 -t dev -
[+] Building 11.1s (54/54) FINISHED
 => [internal] load .dockerignore                                                               0.0s
 => => transferring context: 2B                                                                 0.0s
 => [internal] load build definition from Dockerfile                                            0.1s
 => => transferring dockerfile: 2.30kB                                                          0.0s
 => [internal] load metadata for docker.io/library/alpine:latest                                0.4s
 => [1/49] FROM docker.io/library/alpine@sha256:ca1c944a4f8486a153024d9965aafbe24f5723c1d5c02f  0.0s
 => => resolve docker.io/library/alpine@sha256:ca1c944a4f8486a153024d9965aafbe24f5723c1d5c02f4  0.0s
 => CACHED [2/49] RUN apk update                                                                0.0s
 => CACHED [3/49] RUN apk add openssh                                                           0.0s
 => CACHED [4/49] RUN apk add bash                                                              0.0s
 => CACHED [5/49] RUN apk add bind-tools                                                        0.0s
 => CACHED [6/49] RUN apk add curl                                                              0.0s
 => CACHED [7/49] RUN apk add docker                                                            0.0s
 => CACHED [8/49] RUN apk add g++                                                               0.0s
 => CACHED [9/49] RUN apk add gcc                                                               0.0s
 => CACHED [10/49] RUN apk add git                                                              0.0s
 => CACHED [11/49] RUN apk add git-perl                                                         0.0s
 => CACHED [12/49] RUN apk add make                                                             0.0s
 => CACHED [13/49] RUN apk add python                                                           0.0s
 => CACHED [14/49] RUN apk add openssl-dev                                                      0.0s
 => CACHED [15/49] RUN apk add vim                                                              0.0s
 => CACHED [16/49] RUN apk add py-pip                                                           0.0s
 => CACHED [17/49] RUN apk add file                                                             0.0s
 => CACHED [18/49] RUN apk add groff                                                            0.0s
 => CACHED [19/49] RUN apk add jq                                                               0.0s
 => CACHED [20/49] RUN apk add man                                                              0.0s
 => CACHED [21/49] RUN cd /tmp && git clone https://github.com/AGWA/git-crypt && cd git-crypt   0.0s
 => CACHED [22/49] RUN apk add go                                                               0.0s
 => CACHED [23/49] RUN apk add coreutils                                                        0.0s
 => CACHED [24/49] RUN apk add python2-dev                                                      0.0s
 => CACHED [25/49] RUN apk add python3-dev                                                      0.0s
 => CACHED [26/49] RUN apk add tar                                                              0.0s
 => CACHED [27/49] RUN apk add vim                                                              0.0s
 => CACHED [28/49] RUN apk add rsync                                                            0.0s
 => CACHED [29/49] RUN apk add less                                                             0.0s
 => CACHED [30/49] RUN pip install awscli                                                       0.0s
 => CACHED [31/49] RUN curl --silent --location "https://github.com/weaveworks/eksctl/releases  0.0s
 => CACHED [32/49] RUN curl https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-  0.0s
 => CACHED [33/49] RUN curl -L -o /usr/local/bin/kubectl https://storage.googleapis.com/kubern  0.0s
 => CACHED [34/49] RUN curl -L -o /usr/local/bin/kustomize  https://github.com/kubernetes-sigs  0.0s
 => CACHED [35/49] RUN apk add ruby                                                             0.0s
 => CACHED [36/49] RUN apk add ruby-dev                                                         0.0s
 => CACHED [37/49] RUN gem install bigdecimal --no-ri --no-rdoc                                 0.0s
 => CACHED [38/49] RUN gem install kubernetes-deploy --no-ri --no-rdoc                          0.0s
 => CACHED [39/49] RUN apk add npm                                                              0.0s
 => CACHED [40/49] RUN npm config set unsafe-perm true                                          0.0s
 => CACHED [41/49] RUN npm install -g yarn                                                      0.0s
 => CACHED [42/49] RUN npm install -g netlify-cli                                               0.0s
 => CACHED [43/49] RUN apk add libffi-dev                                                       0.0s
 => CACHED [44/49] RUN pip install docker-compose                                               0.0s
 => CACHED [45/49] RUN apk add shadow sudo                                                      0.0s
 => CACHED [46/49] RUN echo '%wheel ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers                     0.0s
 => CACHED [47/49] RUN useradd -G docker,wheel -m -s /bin/bash -u 1002 sh                       0.0s
 => CACHED [48/49] RUN groupmod -o -g 999 docker                                                0.0s
 => CACHED [49/49] WORKDIR /home/sh                                                             0.0s
 => ERROR exporting to oci image format                                                        10.5s
 => => exporting layers                                                                         0.6s
 => => exporting manifest sha256:97c8dedb84183d0d87b6c930b12e1b9396bb81fd9c6587fe2fbb9ae092d30  0.0s
 => => exporting config sha256:ef15b3f6a374fd494a0a586f7b33ac9435953460776e268b20f2eee5f14def6  0.0s
 => => sending tarball                                                                          9.6s
 => importing to docker                                                                         0.0s
------
 > exporting to oci image format:
------
Error: failed to solve: rpc error: code = Unknown desc = content digest sha256:ef15b3f6a374fd494a0a586f7b33ac9435953460776e268b20f2eee5f14def65: not found
Usage:
  /home/sh/bin/docker-buildx build [OPTIONS] PATH | URL | - [flags]

Aliases:
  build, b

Flags:
      --add-host strings         Add a custom host-to-IP mapping (host:ip)
      --build-arg stringArray    Set build-time variables
      --cache-from stringArray   External cache sources (eg. user/app:cache, type=local,src=path/to/dir)
      --cache-to stringArray     Cache export destinations (eg. user/app:cache, type=local,dest=path/to/dir)
  -f, --file string              Name of the Dockerfile (Default is 'PATH/Dockerfile')
  -h, --help                     help for build
      --iidfile string           Write the image ID to the file
      --label stringArray        Set metadata for an image
      --load                     Shorthand for --output=type=docker
      --network string           Set the networking mode for the RUN instructions during build (default "default")
      --no-cache                 Do not use cache when building the image
  -o, --output stringArray       Output destination (format: type=local,dest=path)
      --platform stringArray     Set target platform for build
      --progress string          Set type of progress output (auto, plain, tty). Use plain to show container output (default "auto")
      --pull                     Always attempt to pull a newer version of the image
      --push                     Shorthand for --output=type=registry
      --secret stringArray       Secret file to expose to the build: id=mysecret,src=/local/secret
      --ssh stringArray          SSH agent socket or keys to expose to the build (format: default|<id>[=<socket>|<key>[,<key>]])
  -t, --tag stringArray          Name and optionally a tag in the 'name:tag' format
--target string Set the target build stage to build.
@tonistiigi
Copy link
Member

tonistiigi commented Jul 8, 2019

I think I see how this could happen if there are parallel builds that end up building the same image and one ends up finishing with this error during load. Is this case possible in your case?

If not then I need to enable debug logs in buildx cause without them it's very hard to guess what actually happened.

@tonistiigi
Copy link
Member

tonistiigi commented Jul 9, 2019

With #102 you can create the builder instance with docker buildx create --buildkitd-flags '--debug' and after this happens use docker logs <buildkit_container> to get the debug logs for the daemon.

@shykes shykes changed the title [bug] Error: failed to solve: rpc error: code = Unknown desc [bug] Error: failed to solve: rpc error: code = Unknown desc = content digest sha256:...: not found Jul 10, 2019
@shykes
Copy link
Contributor Author

shykes commented Jul 10, 2019

I think I see how this could happen if there are parallel builds that end up building the same image and one ends up finishing with this error during load. Is this case possible in your case?

Yes, that is very likely. Both environments where the issue occurred match your description. In fact I am also encountering another issue (issue coming soon) which is definitely related to concurrency.

@tonistiigi tonistiigi added kind/bug Something isn't working buildkit labels Jul 12, 2019
@tonistiigi tonistiigi mentioned this issue Jul 12, 2019
exporter: keep lease when exporting images moby/buildkit#1077
Merged
@AkihiroSuda AkihiroSuda closed this as completed in moby/buildkit#1077 Jul 15, 2019
@shykes
Copy link
Contributor Author

shykes commented Jul 15, 2019

Thank you!

@vabene1111 vabene1111 mentioned this issue Apr 13, 2020
Error failed to solve: rpc error: code = Unknown desc = server message: insufficient_scope: authorization failed ilteoood/docker_buildx#7
Closed
@kegi
Copy link

kegi commented May 6, 2020

I think this should be reopen.
I'm having this error quite often when I build. Usually, I just re-run the command until it stop failing. (2-3 times in average).

I'm building for 3 platforms in parallel.

Docker version : 19.03.8, build afacb8b

@MarkCarbonell98
Copy link

MarkCarbonell98 commented May 13, 2020

Same error here:

Screenshot from 2020-05-13 11-38-53

Using docker Docker version 19.03.8, build afacb8b7f0

On a Raspberry Pi with arm32v7 architecture

@skabashnyuk
Copy link

skabashnyuk commented May 20, 2020

I think this should be reopen.
I'm having this error quite often when I build. Usually, I just re-run the command until it stop failing. (2-3 times in average).

I'm building for 2 platforms in parallel.

Got the same here https://github.com/eclipse/che-dashboard/actions

@tonistiigi
Copy link
Member

tonistiigi commented May 20, 2020

Please open a new issue with reproduction steps if you think there is still a way to hit this.

@shaunc
Copy link

shaunc commented Jul 19, 2020

According to https://stackoverflow.com/questions/59868448/rpc-error-code-unknown-desc-failed-to-build-llb this is a resource issue. Indeed, adding another processor and a Gig seems to be working for me. Obviously a better error would be appropriate, at the least.

@holdenk
Copy link

holdenk commented Oct 3, 2020

Just ran into this as well, cross building locally with qemu the docker file was

FROM debian:buster-slim

ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
ENV PATH /opt/conda/bin:$PATH

RUN apt-get update --fix-missing && \
    apt-get install -y wget bzip2 ca-certificates libglib2.0-0 libxext6 libsm6 libxrender1 git mercurial subversion && \
    apt-get clean

COPY setup.sh /setup.sh
RUN /setup.sh
CMD [ "/bin/bash" ]

and the setup file

#!/bin/bash

set -ex
export arch=$(uname -m)
if [ "$arch" == "aarm64" ]; then
  arch="arm64";
fi
wget --quiet https://github.com/conda-forge/miniforge/releases/download/4.8.5-1/Miniforge3-4.8.5-1-Linux-${arch}.sh -O ~/miniforge.sh
chmod a+x ~/miniforge.sh
~/miniforge.sh -b -p /opt/conda
/opt/conda/bin/conda clean -tipsy
ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh
echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc
echo "conda activate base" >> ~/.bashrc
find /opt/conda/ -follow -type f -name '*.a' -delete
find /opt/conda/ -follow -type f -name '*.js.map' -delete
/opt/conda/bin/conda clean -afy

My build command was: docker buildx build -t holdenk/miniforge3:v0 . --platform linux/amd64,linux/arm64 --push

re-running seems to solve the issue though.

@tianhaoz95 tianhaoz95 mentioned this issue Oct 16, 2020
Seems to have failed due to resource issue docker/build-push-action#178
Closed
@tamalsaha tamalsaha mentioned this issue Jan 7, 2021
dpkg errors under qemu emulation for arm64 #499
Closed
@qinggniq qinggniq mentioned this issue Feb 6, 2021
docker linux multiarch ci test fails randomly envoyproxy/envoy#14971
Closed
@huguesBouvier
Copy link

huguesBouvier commented Feb 13, 2021

I am getting the same issue too: It happened for arm64

@andrewthetechie
Copy link

andrewthetechie commented Feb 13, 2021

Seeing this as well, building for amd64 and arm64 in parallel

`

ocker versio

2 | Client: Docker Engine - Community
3 | Version: 20.10.3
4 | API version: 1.41
5 | Go version: go1.13.15
6 | Git commit: 48d30b5
7 | Built: Fri Jan 29 14:28:23 2021
8 | OS/Arch: linux/amd64
9 | Context: default
10 | Experimental: true
11 | 聽
12 | Server: Docker Engine - Community
13 | Engine:
14 | Version: 20.10.3
15 | API version: 1.41 (minimum version 1.12)
16 | Go version: go1.13.15
17 | Git commit: 46229ca
18 | Built: Fri Jan 29 14:31:57 2021
19 | OS/Arch: linux/amd64
20 | Experimental: true
21 | containerd:
22 | Version: v1.4.3
23 | GitCommit: 269548fa27e0089a8b8278fc4fc781d7f65a939b
24 | runc:
25 | Version: 1.0.0-rc92
26 | GitCommit: ff819c7e9184c13b7c2607fe6c30ae19403a7aff
27 | docker-init:
28 | Version: 0.19.0
29 | GitCommit: de40ad0
30 | + docker buildx version
31 | github.com/docker/buildx v0.5.1 11057da
`

In my case, this is failing as a part of a drone build running inside a kubernetes cluster.

@tonistiigi
Copy link
Member

tonistiigi commented Feb 13, 2021

This issue has been closed. If you are seeing something similar create a new issue with a reproducer and full version infos.

@TriplEight TriplEight mentioned this issue Mar 1, 2021
Overhaul releasing process paritytech/parity-bridges-common#779
Merged
@mmorhun mmorhun mentioned this issue Jul 1, 2021
Build rest-server from source che-dockerfiles/che-backup-server-rest#2
Merged
@valeriupredoi valeriupredoi mentioned this issue Sep 7, 2021
Automatic builds on DockerHub are failing ESMValGroup/ESMValTool#2276
Closed
@juslintek juslintek mentioned this issue Sep 9, 2021
[BUG] failed to solve: rpc error: code = Unknown desc = executor failed running #763
Closed
@lei-cheung
Copy link

lei-cheung commented Sep 15, 2021

use docker login you account

@itspawanhere
Copy link

itspawanhere commented Feb 13, 2022

I have a Macbook pro with M1 chip.
And I keep getting the same error: failed to solve: rpc error: code = Unknown desc

@Amin-asadii
Copy link

Amin-asadii commented Feb 21, 2022

ERROR [bass-master_ida stage-1 4/24] COPY ida.run /installation/
plase slove thise error

@cah-iovani-juarezgarcia
Copy link

cah-iovani-juarezgarcia commented Apr 20, 2022

Having same error, im connecting from a different country from where i usually connect so... maybe a vpn related issue?

@yvess
Copy link

yvess commented May 3, 2022

have the same error on Mac (docker desktop 4.7.1) only arm64 buildx with:

  • "--load" -> "failed to solve: failed to get reader: content digest sha256:a3...: not found"
  • "--push" works

@alberto56
Copy link

alberto56 commented Nov 7, 2022

I get this error if I use the DigitalOcean "Docker" image, which has an old version of Docker on it. If I use the "Ubuntu" image and install Docker myself, I no longer get this error.

@dessalines dessalines mentioned this issue Nov 14, 2022
Docker development instructions doesn't work on m1 mac by default LemmyNet/lemmy#2559
Closed
@digitaltim-de
Copy link

digitaltim-de commented Dec 9, 2022

Having the same error randomly...

@sabaimran
Copy link

sabaimran commented Feb 14, 2023

In case it might help someone else, I ran into the issue because my Dockerfile wasn't in the root of my folder where I was expecting it to be.

@olahsymbo
Copy link

olahsymbo commented Feb 20, 2023

I solved this issue by first deleting ~/.docker/config.json then sign in again using sudo docker login. Afterward, I changed the name from Dockerfile to dockerfile and finally tried sudo docker-compose build

@crazy-max
Copy link
Member

crazy-max commented Jul 28, 2023

Locking this issue. Open a new issue with reproduction steps if you hit this again. Thanks.

@docker docker locked as resolved and limited conversation to collaborators Jul 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

exporter: keep lease when exporting images tonistiigi/buildkit
19 participants
@shykes @holdenk @yvess @shaunc @tonistiigi @alberto56 @andrewthetechie @skabashnyuk @crazy-max @itspawanhere @kegi @olahsymbo @digitaltim-de @MarkCarbonell98 @huguesBouvier @sabaimran @lei-cheung @Amin-asadii @cah-iovani-juarezgarcia

Footer

© 2024 GitHub, Inc.

两个鬼故事恋爱的味道在线观看国务委员名单均字起名智能家居公司起名大全姓金的女宝宝起名的潘姓起名夜书所见的意思极限17范刘怎么起名字火锅名字大全起名大全集kaixin001正阳门下电视剧36集全免费宝宝四个字起名字cctv12直播术士起什么名字好听霄起名允和什么字一起取名好五行属金的字起公司名字五个起名2014年属马的女孩起什么名字金姓起名男孩取名蕉叶餐厅混世妖王五格三才起名朱锁锁叶总是父女关系吗halloween什么意思建筑劳务公司起名简洁大气邯郸学院大名分院爱钱进理财2018李姓女孩起名大全少年生前被连续抽血16次?多部门介入两大学生合买彩票中奖一人不认账让美丽中国“从细节出发”淀粉肠小王子日销售额涨超10倍高中生被打伤下体休学 邯郸通报单亲妈妈陷入热恋 14岁儿子报警何赛飞追着代拍打雅江山火三名扑火人员牺牲系谣言张家界的山上“长”满了韩国人?男孩8年未见母亲被告知被遗忘中国拥有亿元资产的家庭达13.3万户19岁小伙救下5人后溺亡 多方发声315晚会后胖东来又人满为患了张立群任西安交通大学校长“重生之我在北大当嫡校长”男子被猫抓伤后确诊“猫抓病”测试车高速逃费 小米:已补缴周杰伦一审败诉网易网友洛杉矶偶遇贾玲今日春分倪萍分享减重40斤方法七年后宇文玥被薅头发捞上岸许家印被限制高消费萧美琴窜访捷克 外交部回应联合利华开始重组专访95后高颜值猪保姆胖东来员工每周单休无小长假男子被流浪猫绊倒 投喂者赔24万小米汽车超级工厂正式揭幕黑马情侣提车了西双版纳热带植物园回应蜉蝣大爆发当地回应沈阳致3死车祸车主疑毒驾恒大被罚41.75亿到底怎么缴妈妈回应孩子在校撞护栏坠楼外国人感慨凌晨的中国很安全杨倩无缘巴黎奥运校方回应护栏损坏小学生课间坠楼房客欠租失踪 房东直发愁专家建议不必谈骨泥色变王树国卸任西安交大校长 师生送别手机成瘾是影响睡眠质量重要因素国产伟哥去年销售近13亿阿根廷将发行1万与2万面值的纸币兔狲“狲大娘”因病死亡遭遇山火的松茸之乡“开封王婆”爆火:促成四五十对奥巴马现身唐宁街 黑色着装引猜测考生莫言也上北大硕士复试名单了德国打算提及普京时仅用姓名天水麻辣烫把捣辣椒大爷累坏了

两个鬼故事 XML地图 TXT地图 虚拟主机 SEO 网站制作 网站优化