Marc
Marc

Reputation: 3904

importing image fails with "/var/lib/docker/tmp/... no such file or directory"

I try to import a multiplatform docker image, build&exported with docker buildx build --platform linux/amd64,linux/arm64 -t openhaus/backend:latest --output type=oci,dest=backend-multi.tar .

The build completes, and outputed the image as backend-multi.tar. I copied the file via scp to my raspberry, and wanted to import the image with docker load -i backend-multi.tar

The import fails with:

root@testboard:~# docker load -i backend-multi.tar 
open /var/lib/docker/tmp/docker-import-107471782/blobs/json: no such file or directory

Another try to bypass this, was with docker import from https://stackoverflow.com/a/72829299/5781499, but that fails when you try to start a container with:

root@testboard:~# docker run -it --rm openhaus/backend:latest
docker: Error response from daemon: no command specified.

Whats the proper way to build a multiplatform image, export and import it?
I want first test the image before push it into a registry.

Not sure if the question is better suited on another SO site.

Upvotes: -1

Views: 46

Answers (1)

Anemoia
Anemoia

Reputation: 8116

For me the solution was to enable the containerd backend.

On GitHub Actions:

      - name: Set up Docker
        uses: docker/setup-docker-action@v4
        with:
          daemon-config: |
            {
              "features": {
                "containerd-snapshotter": true
              }
            }

On Docker Desktop:

Screenshot of Docker Desktop showing the checkbox to enable containerd.

Upvotes: 0

Related Questions