Skip to content
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.

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

Already on GitHub? Sign in to your account

[containerd] manifest list pointing to schema1 not supported #878

Open
moikot opened this issue Mar 15, 2019 · 4 comments
Open

[containerd] manifest list pointing to schema1 not supported #878

moikot opened this issue Mar 15, 2019 · 4 comments

Comments

@moikot
Copy link

moikot commented Mar 15, 2019

I can successfully pull arm64/v8 Golang images using

docker pull arm64v8/golang:1.12-alpine

But when I try to build an image specifying arm64/v8 as the platform using buildkit the build fails with error:

error: failed to solve: rpc error: code = Unknown desc = failed to copy: httpReaderSeeker: failed open: could not fetch content descriptor sha256:7cf1f7ccf392bd834eb91f02892f48992d3c2ba292c2198315a4637bb9454c30 (application/vnd.docker.distribution.manifest.v1+json) from remote: not found

I inspected the manifests for golang using weshigbee/manifest-tool and it reported that there are no layers for arm64/v8 so I submitted an issue for golang.

But the issue was investigated and @yosifkit found out that it was a glitch on Github and some manifests were pushed as v2 and some as v1 and an issue was raised for manifest-tool too.

Would it be possible to handle such situation, when some manifests are using v2 and some v1, correctly in buildkit?

@tonistiigi
Copy link
Member

I'm not quite sure what command you are running. Tried building from arm64v8/golang:1.12-alpine with both buildctl and docker and didn't have issues. Also arm64v8/golang:1.12-alpine is not a manifest list at all. It's possible that the image has changed after you tried to build.

We should avoid v1 images for whatever reason in the upload process. They have been discouraged for more than 3 years now and there is absolutely no reason for ever creating them. docker engine codebase still not giving an error for them isn't really an argument. A future version of docker will stop supporting them, the question is only when.

@moikot
Copy link
Author

moikot commented Mar 16, 2019

Thank you for looking at this issue. It seems like golang:1.12-alpine finally got linux/arm64 v2 manifest. At least I can see it executing docker run --rm weshigbee/manifest-tool inspect golang:1.12-alpine. But for some reason, I still can't build.

My Dockerfile

FROM golang:1.12.0-alpine

How I start buildkit

export BUILDKIT_HOST=tcp://0.0.0.0:1234
sudo docker run --privileged linuxkit/binfmt:v0.6
sudo docker run -d --privileged \
    -p "1234":"1234" \
    --name buildkit moby/buildkit:latest \
    --addr "tcp://0.0.0.0:1234" \
    --oci-worker-platform "linux/arm64"

How I'm trying to build

buildctl build \
    --frontend dockerfile.v0 \
    --frontend-opt platform="linux/arm64" \
    --local dockerfile=. \
    --local context=.

@tonistiigi
Copy link
Member

tonistiigi commented Mar 16, 2019

@moikot I do see the issue with golang:1.12.0-alpine. Could you report this to https://github.com/containerd/containerd/ please cause that's where its originating.

» ctr image pull --platform=linux/arm64 docker.io/library/golang:1.12.0-alpine
docker.io/library/golang:1.12.0-alpine: resolving      |--------------------------------------|
elapsed: 0.9 s                          total:   0.0 B (0.0 B/s)                             docker.io/library/golang:1.12.0-alpine:                                        resolved      docker.io/library/golang:1.12.0-alpine:                                          resolved       |++++++++++++++++++++++++++++++++++++++|
index-sha256:6c143f415448f883ed034529162b3dc1c85bb2967fdd1579a873567b22bcb790:   done           |++++++++++++++++++++++++++++++++++++++|
unknown-sha256:7cf1f7ccf392bd834eb91f02892f48992d3c2ba292c2198315a4637bb9454c30: waiting        |--------------------------------------|
elapsed: 1.1 s                                                                   total:  2.3 Ki (2.1 KiB/s)
WARN[0001] reference for unknown type: application/vnd.docker.distribution.manifest.v1+json
ctr: failed to copy: httpReaderSeeker: failed open: could not fetch content descriptor sha256:7cf1f7ccf392bd834eb91f02892f48992d3c2ba292c2198315a4637bb9454c30 (application/vnd.docker.distribution.manifest.v1+json) from remote: not found

@moikot
Copy link
Author

moikot commented Mar 16, 2019

Done

@tonistiigi tonistiigi changed the title Unable to build using Golang 1.11 or 1.12 for arm64/v8 [containerd] manifest list pointing to schema1 not supported Mar 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants