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

[20.10 beta] regression / change in behavior when running different architecture images #41552

Closed
thaJeztah opened this issue Oct 15, 2020 · 9 comments · Fixed by #41556
Closed
Labels
area/distribution area/images kind/bug Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed. version/20.10
Milestone

Comments

@thaJeztah
Copy link
Member

See #40725 (comment)

This came up in CI for Docker Desktop;

looks like #40725 introduced a regression / change in behavior; it will now at all times print an error, even if the platform supports the other architecture (through quemu);

docker run --rm arm32v7/alpine uname -m

Unable to find image 'arm32v7/alpine:latest' locally
latest: Pulling from arm32v7/alpine
52278dd8e579: Pulling fs layer
52278dd8e579: Verifying Checksum
52278dd8e579: Download complete
52278dd8e579: Pull complete
Digest: sha256:c929c5ca1d3f793bfdd2c6d6d9210e2530f1184c0f488f514f1bb8080bb1e82b
Status: Downloaded newer image for arm32v7/alpine:latest
docker: Error response from daemon: image with reference arm32v7/alpine was found but does not match the specified platform cpu architecture: wanted: amd64, actual: arm.
See 'docker run --help

The above previously worked, but now requires the --platform flag to be set (even though the image is not multi-arch)

/cc @cpuguy83 @tonistiigi

@thaJeztah thaJeztah added area/distribution kind/bug Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed. area/images version/20.10 labels Oct 15, 2020
@thaJeztah thaJeztah added this to the 20.10.0 milestone Oct 15, 2020
@cpuguy83
Copy link
Member

I'll take a look at this today.

I don't remember why it was needed to set the platform (when not set) in the API layer.

@thaJeztah
Copy link
Member Author

Manifest is missing arch;

{
	"schemaVersion": 2,
	"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
	"config": {
		"mediaType": "application/vnd.docker.container.image.v1+json",
		"size": 1507,
		"digest": "sha256:7e4bece93b3e57b41f44ed293874207984d801979836c7aa4f8e9ef079f5283c"
	},
	"layers": [
		{
			"mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
			"size": 2406763,
			"digest": "sha256:52278dd8e57993669c5b72a9620e89bebdc098f2af2379caaa8945f7403f77a2"
		}
	]
}

@tianon
Copy link
Member

tianon commented Oct 15, 2020

That config object does have os+architecture, though:

{
  "architecture": "arm",
  ...
  "os": "linux",
  ...
}

@StefanScherer
Copy link
Contributor

Desktop CI was failing last night with the workaround adding --platform linux/arm running this command:

docker run --platform=linux/arm --rm arm32v7/alpine uname -m

"--platform" is only supported on a Docker daemon with experimental features enabled

Could we maybe have --platform out of experimental?

@cpuguy83
Copy link
Member

@StefanScherer This is fixed by #41556, just needs one more review.

@stephen-turner
Copy link

@thaJeztah @cpuguy83 A very similar but not identical issue has been reported by a user at docker/for-win#9166. Does the patch fix this case too?

@StefanScherer
Copy link
Contributor

The only detail in docker/for-win#9166 is that it's a mixture of Windows and Linux containers. I assume the user was using LCOW?

@cronventis
Copy link

cronventis commented Oct 21, 2020

I assume the user was using LCOW?

That is correct.

Please ask for any additional information I can provide. Although I went back to v19.03.13 because I need to continue working ;)

@StefanScherer
Copy link
Contributor

Thanks @cronventis to confirm this. I suggest to make your use-case visible (eg. the thumbs up at the beginning) in this ticket docker/roadmap#79 as well. Thanks.

codefromthecrypt pushed a commit to openzipkin/docker-alpine that referenced this issue Dec 17, 2020
Using Docker 20.10 commands we used before now break like this:

```
image with reference sha256:6deb7d92f59f205ddaf95230bec403fd117ab8f509074f09a3fc6b108276d744 was found but does not match the specified platform: wanted linux/arm64, actual: linux/amd64
```

This switches to always use BUILDKIT=1 when pushing images, as Docker
changed behavior in 20.10 and it is more complex to figure out if we are
20.10 or not, and would be annoying to figure out what later versions
would do.

See moby/moby#41552
codefromthecrypt pushed a commit to openzipkin/docker-alpine that referenced this issue Dec 17, 2020
Using Docker 20.10 commands we used before now break like this:

```
image with reference sha256:6deb7d92f59f205ddaf95230bec403fd117ab8f509074f09a3fc6b108276d744 was found but does not match the specified platform: wanted linux/arm64, actual: linux/amd64
```

This switches to always use BUILDKIT=1 when pushing images, as Docker
changed behavior in 20.10 and it is more complex to figure out if we are
20.10 or not, and would be annoying to figure out what later versions
would do.

See moby/moby#41552
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/distribution area/images kind/bug Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed. version/20.10
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants