镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

cannot write /tmp/tmp4phcyxn2 because server did not provide an image ID #2971

Open

Description

@AlonMiz

Description
Build fails with error:
cannot write /tmp/tmp4phcyxn2 because server did not provide an image ID

$ CACHE_FROM=27d861591f4da977a04e94431f1fce214485f293 COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose build --progress=plain --build-arg BUILDKIT_INLINE_CACHE=1
Native build is an experimental feature and could change at any time
Building app-frontend
WARNING: Error loading config file: .dockercfg: $HOME is not defined
WARNING: Error loading config file: .dockercfg: $HOME is not defined
#1 [internal] load build definition from Dockerfile
#1 sha256:bfa4b15feec4aff66a56da2fffc697555bf3abd42288cdb47fe7d6e146e43d25
#1 transferring dockerfile: 1.98kB done
#1 DONE 0.5s
#2 [internal] load .dockerignore
#2 sha256:c8a814244b123e69ef5bdbc269631c12cdf20bed9340d85934d92a5b7b8c249f
#2 transferring context: 114B done
#2 DONE 0.4s

....
....
...

#33 158.8 webpack 5.9.0 compiled with 17 warnings in 153155 ms
#33 159.2 Done in 158.35s.
#33 DONE 159.4s
cannot write /tmp/tmp4phcyxn2 because server did not provide an image ID

Steps to reproduce the issue:

  1. building images parallel with docker compose

Describe the results you received:
Docker compose fail to build

Describe the results you expected:
either success or provide a meaningful error message

Additional information you deem important (e.g. issue happens only occasionally):
the issue doesn't occur on every build
we use jenkins as our ci
and some of the build are failing. not all, not even most. but we have 10s of failures per day (out of hundreds)
Output of docker version:

WARNING: Error loading config file: .dockercfg: $HOME is not defined
Client: Docker Engine - Community
 Version:           20.10.2
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        2291f61
 Built:             Mon Dec 28 16:17:29 2020
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.2
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       8891c58
  Built:            Mon Dec 28 16:15:23 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.3
  GitCommit:        269548fa27e0089a8b8278fc4fc781d7f65a939b
 runc:
  Version:          1.0.0-rc92
  GitCommit:        ff819c7e9184c13b7c2607fe6c30ae19403a7aff
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Output of docker info:

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  app: Docker App (Docker Inc., v0.9.1-beta3)
  buildx: Build with BuildKit (Docker Inc., v0.5.1-docker)

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 17
 Server Version: 20.10.2
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 269548fa27e0089a8b8278fc4fc781d7f65a939b
 runc version: ff819c7e9184c13b7c2607fe6c30ae19403a7aff
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: default
 Kernel Version: 4.4.0-1121-aws
 Operating System: Ubuntu 16.04.7 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 32
 Total Memory: 58.97GiB
 Name: ip-172-29-38-181
 ID: 52OS:AMCC:AUGD:EYU4:SQAP:3FUE:2OF7:LJMH:IWMF:VAAB:K7TG:XR3S
 Docker Root Dir: /mnt/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  registry.internal.****.io:5000
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No swap limit support

Additional environment details (AWS, VirtualBox, physical, etc.):
AWS, ubuntu, running jenkins

Activity

  1. thaJeztah commented on Feb 15, 2021

    @thaJeztah
    Member

    error is produced in this part;

    if options.imageIDFile != "" {
    if imageID == "" {
    return errors.Errorf("cannot write %s because server did not provide an image ID", options.imageIDFile)
    }
    imageID = strings.TrimSpace(imageID)
    if err := ioutil.WriteFile(options.imageIDFile, []byte(imageID), 0666); err != nil {
    return errors.Wrap(err, "cannot write image ID file")
    }
    }

    the issue doesn't occur on every build we use jenkins as our ci and some of the build are failing. not all, not even most. but we have 10s of failures per day (out of hundreds)

    Curious; could it be that it's happening in situations where the cache was fully used, and no new image was built?

  2. thaJeztah commented on Feb 15, 2021

    @thaJeztah
    Member

    Hmm... output of your example shows that at least some part of the build did not use cache;

    #33 158.8 webpack 5.9.0 compiled with 17 warnings in 153155 ms
    #33 159.2 Done in 158.35s.
    #33 DONE 159.4s
    

    So probably that's not it (unless it still produced the same artefact in the end 🤔)

  3. AlonMiz commented on Feb 15, 2021

    @AlonMiz
    Author

    thanks! yea it does some of the build not from the cache (either local or remote)

  4. thaJeztah commented on Feb 15, 2021

    @thaJeztah
    Member

    I asked @tonistiigi to have a look as well (as he may have a better clue what could cause this); it's a USA Holiday today, so I don't expect him to have a look Today at least.

    If you have more information that could help debugging (if the failing builds are on a public repo and logs are still available; feel free to post a link)

  5. tonistiigi commented on Feb 16, 2021

    @tonistiigi
    Member

    Please post a reproducer. If you can reproduce without compose then that would be preferable.

  6. AlonMiz commented on Feb 16, 2021

    @AlonMiz
    Author

    it's not reproducible at all. it happens occasionally. and not in our local env. only in our CI
    and it's a private repo as well but i can share more logs from the build. (not that they are so meaningful as i shared the important parts)

  7. tonistiigi commented on Feb 17, 2021

    @tonistiigi
    Member

    @AlonMiz You don't happen to be using docker buildx install?

    @ulyssessouza FYI if you've seen this in compose or have ideas. Does compose set --load always when invoking builds? Looks like image was never created. This happens on if you don't specify an output on buildx container driver (but there should be a warning then). Or if you specify output other than image.

  8. ulyssessouza commented on Feb 17, 2021

    @ulyssessouza
    Contributor

    @tonistiigi No. I've never seen that.
    And docker-compose does not set --load nor use buildx only buildkit.

  9. tonistiigi commented on Feb 17, 2021

    @tonistiigi
    Member

    @ulyssessouza buildx can replace docker build command if it is configured to do so. If compose requires image ID to be returned it should set --output=image. Not sure if it is actually related to this issue though.

  10. ulyssessouza commented on Feb 17, 2021

    @ulyssessouza
    Contributor

    @tonistiigi For the image ID docker-compose passes --iidfile do read it after the build and retrieve the image ID
    https://github.com/docker/compose/blob/master/compose/service.py#L1875

  11. AlonMiz commented on Feb 22, 2021

    @AlonMiz
    Author

    we have another insight, worth mentioning
    in some cases when this error occurs, it throws the same error in multiple images builds at once, at the end of each build.
    so in the same pipeline run, we have several successful builds and some failed builds of different images.

    here's an example for such case
    build1:

    $ CACHE_FROM=$(yarn --silent print-latest-commit) COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose build --progress=plain --build-arg BUILDKIT_INLINE_CACHE=1 $npm_package_serviceName
    Building with native build. Learn about native build in Compose here: https://docs.docker.com/go/compose-native-build/
    Building jaeger-manager
    WARNING: Error loading config file: .dockercfg: $HOME is not defined
    WARNING: Error loading config file: .dockercfg: $HOME is not defined
    #1 [internal] load build definition from Dockerfile
    #1 sha256:a79fa14da5a0170e9236ac676ec6779d4dcfbcc8e464697067a3bd933d726097
    #1 transferring dockerfile: 1.52kB done
    #1 DONE 0.0s
    #2 [internal] load .dockerignore
    #2 sha256:90ae748d3b72e855c0118400bbe684662f169fd6805ae892ae6ded9dace5167f
    #2 transferring context: 112B done
    #2 DONE 0.1s
    #3 [internal] load metadata for registry.internal.***.io:5000/node:15.6.0-slim
    #3 sha256:b8b171ed2bb83b615bf3a9008c7266f5f92d83bc1a79a984ac3c6b56ace38cbe
    #3 DONE 0.1s
    #6 [test  1/18] FROM registry.internal.***.io:5000/node:15.6.0-slim@sha256:01faeeed7eb949dbaa66272c3fa2110433dae7d96cd1b3722c3794c39f579c0f
    #6 sha256:b87691b4bde16bb691d2ff64472dd216a5b19944931a0e1e0bb48f7f2c5d080b
    #6 DONE 0.0s
    #5 importing cache manifest from registry.internal.***.io:5000/jaeger-manager:master-latest
    #5 sha256:b120e60b73693a61ffbf45e58ce20f24d8002c3689f2373cf59db45f522be485
    
    .....................
    
    #11 [main  5/11] COPY _isolated_/package-prod.json                          package.json
    #11 sha256:d46c554d49bedfea59a4dbb6791329b61d2ee5d6055d23044d079853580f69aa
    #11 CACHED
    #20 [test  9/16] COPY _isolated_/workspaces  workspaces
    #20 sha256:8f21ee22d594ae8e0b7e9afab3c9221a100ec4f71daf72807f99284fa321e962
    #20 CACHED
    #29 [main 11/11] RUN echo "{ "version": "9f3d85329e38618d79b125da4a49f2fda7fe2cda"}" > workspaces/packages/node-toolbox/src/version.json
    #29 sha256:082d69a768d13bec98d465dad9eb42b2f664b6bd6a10a8393845fd5db6c5645f
    #29 pulling sha256:92da7bf305a81027a1044dc5ccea512435b230ec14dc06c039f6e6d809ea7d66
    #29 pulling sha256:92da7bf305a81027a1044dc5ccea512435b230ec14dc06c039f6e6d809ea7d66 0.5s done
    #29 pulling sha256:269da87585a76a6d968186596102d6ce5caf92cbeed486e0a64cd18a07d1307e
    #29 pulling sha256:269da87585a76a6d968186596102d6ce5caf92cbeed486e0a64cd18a07d1307e 0.2s done
    #29 CACHED
    #30 exporting to image
    #30 sha256:e8c613e07b0b7ff33893b694f7759a10d42e180f2b4dc349fb57dc6b71dcab00
    #30 exporting layers done
    #30 writing image sha256:e77f2f3983eb8064dcbe16174ac963a1bf5248fd798063a1e65c341ce7e22de0 done
    #30 naming to registry.internal.***.io:5000/jaeger-manager:9f3d85329e38618d79b125da4a49f2fda7fe2cda done
    #30 DONE 0.1s
    #31 exporting cache
    #31 sha256:2700d4ef94dee473593c5c614b55b2dedcca7893909811a8f2b48291a1f581e4
    #31 preparing build cache for export
    cannot write /tmp/tmpxs87ztq9 because server did not provide an image ID
    

    another image build failure at the same run:

    $ CACHE_FROM=$(yarn --silent print-latest-commit) COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose build --progress=plain --build-arg BUILDKIT_INLINE_CACHE=1
    app-selenium uses an image, skipping
    Building with native build. Learn about native build in Compose here: https://docs.docker.com/go/compose-native-build/
    Building e2e
    WARNING: Error loading config file: .dockercfg: $HOME is not defined
    WARNING: Error loading config file: .dockercfg: $HOME is not defined
    #1 [internal] load build definition from Dockerfile
    #1 sha256:1537c48e8ef1e725602c40aa757a5deb5699a3776824cc60b99fffa919398f6f
    #1 transferring dockerfile: 1.46kB done
    #1 DONE 0.1s
    #2 [internal] load .dockerignore
    #2 sha256:74b52332e587781e539c061ddb88c87dc4ac8bc93ab480b4000df7fb7efaa561
    #2 transferring context: 112B done
    #2 DONE 0.0s
    #6 [test  1/18] FROM registry.internal.***.io:5000/node:15.6.0-slim@sha256:01faeeed7eb949dbaa66272c3fa2110433dae7d96cd1b3722c3794c39f579c0f
    #6 sha256:b87691b4bde16bb691d2ff64472dd216a5b19944931a0e1e0bb48f7f2c5d080b
    #6 DONE 0.0s
    #3 [internal] load metadata for registry.internal.***.io:5000/node:15.6.0-slim
    #3 sha256:b8b171ed2bb83b615bf3a9008c7266f5f92d83bc1a79a984ac3c6b56ace38cbe
    #3 DONE 0.0s
    #8 [internal] load build context
    #8 sha256:e68651c4ea9337abc961a141c9daf6e82d6332f95fcd4d2e27905be7eb06262b
    #8 DONE 0.0s
    #5 importing cache manifest from registry.internal.***.io:5000/e2e:master-latest
    #5 sha256:82132ab0041364bf21d505a58de90cd3fd122de1006e7da7ba70890af125dc69
    #5 ...
    #4 importing cache manifest from registry.internal.***.io:5000/e2e:9f3d85329e38618d79b125da4a49f2fda7fe2cda
    #4 sha256:d9b0aefca28c59197196f892bd1f48c7fb831ca51f09dc272dbc0b1df900772c
    #4 DONE 0.3s
    #5 importing cache manifest from registry.internal.***.io:5000/e2e:master-latest
    #5 sha256:82132ab0041364bf21d505a58de90cd3fd122de1006e7da7ba70890af125dc69
    #5 DONE 0.4s
    #8 [internal] load build context
    #8 sha256:e68651c4ea9337abc961a141c9daf6e82d6332f95fcd4d2e27905be7eb06262b
    #8 transferring context: 2.20MB 0.2s done
    #8 DONE 0.2s
    #10 [compile  4/13] COPY _isolated_/.yarnrc                                         .yarnrc
    #10 sha256:a8de93648522abc542c4b7d63b4fdc65458af3bfbb2a7f551aa391ff7629a429
    #10 CACHED
    #13 [main  7/10] RUN yarn install --prod --frozen-lockfile && yarn cache clean
    #13 sha256:8bcbfddec0b782e1b84257d10ef44b28ea822da735d67655349708e87979cfb3
    #13 CACHED
    #20 [compile 10/13] COPY .eslintignore  .eslintignore
    #20 sha256:a4a216d0122930a6dbcb2265daed17c9e136dbcc8083ad32368302344775cb5f
    #20 CACHED
    #16 [compile  6/13] COPY _isolated_/workspaces-src-less                             workspaces
    #16 sha256:59a88ebdff8ec1f37e9be53d855facda99f9c513e6a9815a3c999903d66b8425
    #16 CACHED
    #19 [compile  9/13] COPY ui-tests                                                   ui-tests
    #19 sha256:69749031e71f23ae66a5da06eaed360b3d93e86c6cc2bea066e7948628347b31
    #19 CACHED
    #22 [compile 12/13] COPY tsconfig.json                                              tsconfig.json
    #22 sha256:64f3a30b71a2a8447c98545ec18f5b40090bdba50f1ce69b595e023b45fbf293
    #22 CACHED
    #11 [main  5/10] COPY _isolated_/package-prod.json                               package.json
    #11 sha256:51a702049c639d9e3151ea42a912cfe5bbfa9a0a01e067fa1b84c33e50bd778a
    #11 CACHED
    #24 [main  9/10] COPY --from=compile /src/dist                                   dist
    #24 sha256:bc2b3ce92d6bb21c4a3d5378433049368f13db434ec3f1fe9a0c2f8ad403599e
    #24 CACHED
    #15 [compile  5/13] COPY _isolated_/package.json                                    package.json
    #15 sha256:3c3f95eaac949457a8fea1c7d26ce635805e2f8beee1cff5e91d09aa9cf49ae2
    #15 CACHED
    #7 [test  2/18] WORKDIR /src
    #7 sha256:5549513f33a5ad52ca6e7c5ffbde44172d06faeb3d275514beecf46db03e5db8
    #7 CACHED
    #14 [main  8/10] COPY _isolated_/workspaces                                      workspaces
    #14 sha256:98fd5cc63ae0c7171b19a64ab2579942aa328816e81b50f32788b08fbd08df82
    #14 CACHED
    #9 [compile  3/13] COPY _isolated_/yarn.lock                                       yarn.lock
    #9 sha256:a4c668e6a21d0392b7fd2bbfa164e06561ba60dce7930bfcfb443fc41c1e9397
    #9 CACHED
    #18 [compile  8/13] COPY _isolated_/workspaces  workspaces
    #18 sha256:c2ccd3f37ef15cf4e75fd197ec60d91402aa9c75bb6f92b18bcaf454ed32be70
    #18 CACHED
    #12 [main  6/10] COPY _isolated_/workspaces-src-less-prod                        workspaces
    #12 sha256:c5ae48d73cd06fb94d94ef049061211147bf915b256bec7d2024bb71b5df10af
    #12 CACHED
    #17 [compile  7/13] RUN yarn install --frozen-lockfile && yarn cache clean
    #17 sha256:c4b2cd05ed60ad506acf9682d6e6f98c1c12a6c6e449ddd99cbb03b822850a9a
    #17 CACHED
    #23 [compile 13/13] RUN yarn lint && yarn compile
    #23 sha256:baaaa6e0089de87a56d2a9085397193e6e8ae289211bcb68269e91e25f9291d8
    #23 CACHED
    #21 [compile 11/13] COPY .eslintrc.js   .eslintrc.js
    #21 sha256:231a6f935f445c38b02537f58cbe20d1bd73587199a778f6e3a8c35090f547a7
    #21 CACHED
    #25 [main 10/10] RUN echo "{ "version": "9f3d85329e38618d79b125da4a49f2fda7fe2cda"}" > version.json
    #25 sha256:70b0f0755d3104f43bb9132e8c178693f62000bbf600728b9cd5075e1550f507
    #25 pulling sha256:eba798ac6e3530a4bc02df88fc99f6e4a1c721e9665d9742ec852f378f392e6a
    #25 pulling sha256:141a3c18f61492441778289f6e7dde820c595b58f553e9f8296b382f17c463ec
    #25 pulling sha256:53a19f6c217af491df6b64cafb721a5017cd42e3916c7119795a00abc31de4c7
    #25 pulling sha256:141a3c18f61492441778289f6e7dde820c595b58f553e9f8296b382f17c463ec 0.3s done
    #25 pulling sha256:53a19f6c217af491df6b64cafb721a5017cd42e3916c7119795a00abc31de4c7 0.3s done
    #25 pulling sha256:eba798ac6e3530a4bc02df88fc99f6e4a1c721e9665d9742ec852f378f392e6a 0.4s done
    #25 CACHED
    #26 exporting to image
    #26 sha256:e8c613e07b0b7ff33893b694f7759a10d42e180f2b4dc349fb57dc6b71dcab00
    #26 exporting layers done
    #26 writing image sha256:ac0373e5d992b47006e849a16101a5de8b426a0fee64eb64b107a6c2622f509e done
    #26 naming to registry.internal.***.io:5000/e2e:9f3d85329e38618d79b125da4a49f2fda7fe2cda done
    #26 DONE 0.1s
    #27 exporting cache
    #27 sha256:2700d4ef94dee473593c5c614b55b2dedcca7893909811a8f2b48291a1f581e4
    #27 preparing build cache for export
    cannot write /tmp/tmp_bc9imzl because server did not provide an image ID
    
    
  12. Madvinking commented on Mar 5, 2021

    @Madvinking

    any update on this?

  13. 21 remaining items

  14. elgambet commented on Sep 27, 2021

    @elgambet

    Got this issue with Docker Desktop for Mac, went to preferences -> resources and increased the memory, after that the error dissapeared.

    in my case, this was the solution!

    Thank you @SatoshiDark

  15. HMS24 commented on Jan 24, 2022

    @HMS24

    Got this issue with Docker Desktop for Mac, went to preferences -> resources and increased the memory, after that the error dissapeared.

    Got the same issue
    this solve my problem! thx

  16. ofiry-tm commented on Mar 7, 2022

    @ofiry-tm

    I have the same issue.
    I run a jenkins job that run a docker-compose build on an ec2 with 16 GB memory, ( I use jenkins ec2 plugin, only one executer per ec2 instance)
    its hard to believe that its a memory issue.

  17. ofiry-tm commented on May 3, 2022

    @ofiry-tm

    Facing the same issue.

    Downgrading docker-compose to version 1.27.4 fixes the issue.

    this indeed helped us, but only for about 2 months.
    now we have the same issue with 1.27.4 of docker-compose

    UPDATE: looks like updating the docker-compose to version 2.5.0 solved the issue for now

  18. JHIH-LEI commented on May 11, 2022

    @JHIH-LEI

    @ofiry-tm
    1.27.4 is not valid version.
    2.5.0 can not help this issue for me.

    Add more memory also not help.

  19. JHIH-LEI commented on May 11, 2022

    @JHIH-LEI

    I solve my problem after I clean up my memory.
    As you can see I am out of memory.

  20. aliabbasjaffri commented on Oct 7, 2022

    @aliabbasjaffri

    I'm running into the same problem. There is sufficient space and resources allocated to docker but docker-compose build still fails; and spits out a nasty error when i try to force-recreate with docker-compose up

    If i build the same image with docker, it builds and runs perfectly fine, but not with docker-compose. However, because i have previously build the container with docker, with the same tag as the container_name in docker-compose, docker-compose up runs just fine. I hence need to build docker container individually and then run docker-compose to reflect the updated changes.

    • docker version
    docker version                                                                                                                                                       
    Client:
     Cloud integration: v1.0.29
     Version:           20.10.17
     API version:       1.41
     Go version:        go1.17.11
     Git commit:        100c701
     Built:             Mon Jun  6 23:04:45 2022
     OS/Arch:           darwin/arm64
     Context:           default
     Experimental:      true
    
    Server: Docker Desktop 4.12.0 (85629)
     Engine:
      Version:          22.06.0-beta.0-372-gd3bb8227ce.m
      API version:      1.43 (minimum version 1.12)
      Go version:       go1.18.4
      Git commit:       d3bb8227ce
      Built:            Thu Aug 25 16:52:17 2022
      OS/Arch:          linux/arm64
      Experimental:     true
     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.2, build 5becea4c
    docker-py version: 5.0.0
    CPython version: 3.9.0
    OpenSSL version: OpenSSL 1.1.1h  22 Sep 2020
    • docker-compose contents
    version: "3"
    
    services:
      web:
        container_name: "url-shortener"
        build: .
        ports:
          - "3000:3000"
    docker-compose up --build                                                                                                                                          
    Building web
    [+] Building 0.7s (12/12) FINISHED                                                                                                                                                                                                    
     => [internal] load .dockerignore                                                                                                                                                                                                0.0s
     => => transferring context: 119B                                                                                                                                                                                                0.0s
     => [internal] load build definition from Dockerfile                                                                                                                                                                             0.0s
     => => transferring dockerfile: 359B                                                                                                                                                                                             0.0s
     => [internal] load metadata for docker.io/library/node:16                                                                                                                                                                       0.6s
     => [1/7] FROM docker.io/library/node:16@sha256:b35e76ba744a975b9a5428b6c3cde1a1cf0be53b246e1e9a4874f87034222b5a                                                                                                                 0.0s
     => => resolve docker.io/library/node:16@sha256:b35e76ba744a975b9a5428b6c3cde1a1cf0be53b246e1e9a4874f87034222b5a                                                                                                                 0.0s
     => [internal] load build context                                                                                                                                                                                                0.0s
     => => transferring context: 6.44kB                                                                                                                                                                                              0.0s
     => CACHED [2/7] WORKDIR /usr/src/app                                                                                                                                                                                            0.0s
     => CACHED [3/7] COPY package*.json ./                                                                                                                                                                                           0.0s
     => CACHED [4/7] COPY tsconfig*.json ./                                                                                                                                                                                          0.0s
     => CACHED [5/7] COPY nest-cli.json ./                                                                                                                                                                                           0.0s
     => CACHED [6/7] RUN npm install                                                                                                                                                                                                 0.0s
     => CACHED [7/7] COPY . .                                                                                                                                                                                                        0.0s
     => exporting to image                                                                                                                                                                                                           0.0s
     => => exporting layers                                                                                                                                                                                                          0.0s
     => => exporting manifest sha256:76c255667e3a1718ec3255a0441d19b16e3e80b0a995aec1aa3731c00c8f2758                                                                                                                                0.0s
     => => exporting config sha256:b36700a51e7bfa5c16e4d583bce08a36b9f6f35138a1e32ebda42c2589f3bc80                                                                                                                                  0.0s
     => => naming to docker.io/library/url-shortener_web:latest                                                                                                                                                                      0.0s
     => => unpacking to docker.io/library/url-shortener_web:latest                                                                                                                                                                   0.0s
    cannot write /var/folders/ns/22fnl3dj65n2745_r2g1kkjh0000gn/T/tmp58nvvoyy because server did not provide an image ID
    ERROR: Service 'web' failed to build : Build failed
    docker-compose up --force-recreate                                                                                                                                 ✘ 255 adding-docker-support ✱
    Recreating 711be177c97d_url-shortener ... 
    
    ERROR: for 711be177c97d_url-shortener  Resource ID was not provided
    
    ERROR: for web  Resource ID was not provided
    Traceback (most recent call last):
      File "docker-compose", line 3, in <module>
      File "compose/cli/main.py", line 81, in main
      File "compose/cli/main.py", line 203, in perform_command
      File "compose/metrics/decorator.py", line 18, in wrapper
      File "compose/cli/main.py", line 1186, in up
      File "compose/cli/main.py", line 1166, in up
      File "compose/project.py", line 697, in up
      File "compose/parallel.py", line 108, in parallel_execute
      File "compose/parallel.py", line 206, in producer
      File "compose/project.py", line 679, in do
      File "compose/service.py", line 579, in execute_convergence_plan
      File "compose/service.py", line 499, in _execute_convergence_recreate
      File "compose/parallel.py", line 108, in parallel_execute
      File "compose/parallel.py", line 206, in producer
      File "compose/service.py", line 494, in recreate
      File "compose/service.py", line 612, in recreate_container
      File "compose/service.py", line 330, in create_container
      File "compose/service.py", line 921, in _get_container_create_options
      File "compose/service.py", line 960, in _build_container_volume_options
      File "compose/service.py", line 1548, in merge_volume_bindings
      File "compose/service.py", line 1579, in get_container_data_volumes
      File "compose/container.py", line 61, in image_config
      File "docker/utils/decorators.py", line 16, in wrapped
    docker.errors.NullResource: Resource ID was not provided
    [17759] Failed to execute script docker-compose
  21. xinzweb commented on Nov 9, 2022

    @xinzweb

    @aliabbasjaffri I hit the similar issue after I enabled the docker desktop beta features, Use containrd for pulling and storing images. After I disable it, then I don't have this problem anymore.

    This is my docker version

    $ docker version
    Client:
     Cloud integration: v1.0.29
     Version:           20.10.20
     API version:       1.41
     Go version:        go1.18.7
     Git commit:        9fdeb9c
     Built:             Tue Oct 18 18:20:35 2022
     OS/Arch:           darwin/amd64
     Context:           desktop-linux
     Experimental:      true
    
    Server: Docker Desktop 4.13.1 (90346)
     Engine:
      Version:          20.10.20
      API version:      1.41 (minimum version 1.12)
      Go version:       go1.18.7
      Git commit:       03df974
      Built:            Tue Oct 18 18:18:35 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
    

    image

  22. WillBeebe commented on Dec 21, 2022

    @WillBeebe

    @aliabbasjaffri I hit the similar issue after I enabled the docker desktop beta features, Use containrd for pulling and storing images. After I disable it, then I don't have this problem anymore.

    This is my docker version

    $ docker version
    Client:
     Cloud integration: v1.0.29
     Version:           20.10.20
     API version:       1.41
     Go version:        go1.18.7
     Git commit:        9fdeb9c
     Built:             Tue Oct 18 18:20:35 2022
     OS/Arch:           darwin/amd64
     Context:           desktop-linux
     Experimental:      true
    
    Server: Docker Desktop 4.13.1 (90346)
     Engine:
      Version:          20.10.20
      API version:      1.41 (minimum version 1.12)
      Go version:       go1.18.7
      Git commit:       03df974
      Built:            Tue Oct 18 18:18:35 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
    
    image

    Worked for me, thank you!

  23. thaJeztah commented on Dec 21, 2022

    @thaJeztah
    Member

    The issue with containerd integration enabled is likely related to rumpl/moby#125, which will be included in an upcoming release of Docker Desktop (I think the next release will be after the Holidays, so early next Year)

  24. sankarraj-ps commented on Jan 13, 2023

    @sankarraj-ps

    To mitigate this with docker-compose just disable the --parallel build

    disabling parallel worked for me, could anyone please explain how?

  25. thaJeztah commented on Jan 13, 2023

    @thaJeztah
    Member

    @sankarraj-ps is this with "classic" compose (v1) or compose v2?

    Some possible reasons (would have to check the exact implementation in compose, and this depends on what version (v1/v2) of compose);

    • If multiple builds (in parallel) result in the same image to be built, perhaps some of those builds don't produce a "new" image, and therefore don't return an ID (would have to be checked)
    • If compose uses the --iidfile option behind the scenes to store the image-id, and for some reason uses the same file for multiple builds, there could be a race condition (multiple builds attempting to write the ID to the same file)
  26. sankarraj-ps commented on Jan 16, 2023

    @sankarraj-ps

    @sankarraj-ps is this with "classic" compose (v1) or compose v2?

    Some possible reasons (would have to check the exact implementation in compose, and this depends on what version (v1/v2) of compose);

    • If multiple builds (in parallel) result in the same image to be built, perhaps some of those builds don't produce a "new" image, and therefore don't return an ID (would have to be checked)
    • If compose uses the --iidfile option behind the scenes to store the image-id, and for some reason uses the same file for multiple builds, there could be a race condition (multiple builds attempting to write the ID to the same file)

    This is actually classic compose(v1) with parallel builds

  27. lisaschumann commented on May 26, 2023

    @lisaschumann

    For me it also worked again after clearing out memory and restarting/pruning with docker system prune -a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions