python:3.6-alpine "unsupported manifest media type and no default available"

Created on 23 Mar 2019  ·  14Comments  ·  Source: docker-library/python

I'm having some issues pulling down the python:3.6-alpine image.

❯ docker manifest inspect index.docker.io/python:3.6-alpine
unsupported manifest media type and no default available: application/vnd.docker.distribution.manifest.v1+prettyjws

Other versions of python and alpine are working. As does python:3.6-stretch.

❯ docker manifest inspect index.docker.io/python:3.5-alpine
WORKS
❯ docker manifest inspect index.docker.io/python:3.6-alpine
FAILS
❯ docker manifest inspect index.docker.io/python:3.6-stretch
WORKS
❯ docker manifest inspect index.docker.io/python:3.7-alpine
WORKS

Any ideas? It feels like the image needs to be republished, but I'm not sure.

question

All 14 comments

Looks like an issue with the docker manifest inspect experimental feature

$ docker run --rm weshigbee/manifest-tool inspect index.docker.io/python:3.6-alpine
Name:   index.docker.io/python:3.6-alpine (Type: application/vnd.docker.distribution.manifest.list.v2+json)
Digest: sha256:c3b0a0317d0759a0c0b8cf2b2c60ea09729bc9b7faf464ee67434f45de2bb3d1
 * Contains 7 manifest references:
1    Mfst Type: application/vnd.docker.distribution.manifest.v2+json
1       Digest: sha256:39832cd8530d791f512f81d43cc83d9e07e14617d89d33b5d779e5454db7bead
1  Mfst Length: 1368
1     Platform:
1           -      OS: linux
1           -    Arch: amd64
1           - Variant: 
1           - Feature: 
1     # Layers: 5
         layer 1: digest = sha256:8e402f1a9c577ded051c1ef10e9fe4492890459522089959988a4852dee8ab2c
         layer 2: digest = sha256:cda9ba2397ef5f09cf0e723c11a145dbb42779e78fe441904085928399386f10
         layer 3: digest = sha256:7a817918d4d52ca5e7c3c57d904971a321843ba919e35bab135452b2f4f23b66
         layer 4: digest = sha256:e64fbda5eefbb4602ea8e96be3ab4c05b9a77e5a8a42341650b10e0d5a3f7b09
         layer 5: digest = sha256:6d027cc21c420fc1c60ebd5920f41a43971e0644d2e288fa3e8cc5fcc2004685

2    Mfst Type: application/vnd.docker.distribution.manifest.v2+json
2       Digest: sha256:d6282ec9a8ee0a93fdd3ef688ca4e693dbf02e4634d412fa535a8deec901c84b
2  Mfst Length: 1368
. . .

$ docker run --rm weshigbee/manifest-tool inspect index.docker.io/python:3.5-alpine
Name:   index.docker.io/python:3.5-alpine (Type: application/vnd.docker.distribution.manifest.list.v2+json)
Digest: sha256:6926e850135e6bcf419b00ed5be411094ce8f9c0deb9ae896238567882022e10
 * Contains 7 manifest references:
1    Mfst Type: application/vnd.docker.distribution.manifest.v2+json
1       Digest: sha256:c9e3d7c1768946bda737919a0e70ceccc6d16500a94861a0b7393055a7bd7fae
1  Mfst Length: 1368
1     Platform:
1           -      OS: linux
1           -    Arch: amd64
1           - Variant: 
1           - Feature: 
1     # Layers: 5
. . .

Maybe, but if I push a version of the https://github.com/docker-library/python/blob/master/3.6/alpine3.9/Dockerfile
which I build myself and push to AWS ECR, it is working 🤷‍♂️

I'm not sure where this index.docker.io/... stuff is coming from, but I did some tests and I also can't reproduce any failure on python:3.6-alpine here. :confused:

@tianon Random question, but Linux or Mac?

❯ docker version
Client: Docker Engine - Community
 Version:           18.09.2
 API version:       1.39
 Go version:        go1.10.8
 Git commit:        6247962
 Built:             Sun Feb 10 04:12:39 2019
 OS/Arch:           darwin/amd64
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          18.09.2
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.6
  Git commit:       6247962
  Built:            Sun Feb 10 04:13:06 2019
  OS/Arch:          linux/amd64
  Experimental:     false

Hitting the registry API directly (via curl), not using any particular client, and this is the manifest list object I get back on python:3.6-alpine (with a digest of sha256:c3b0a0317d0759a0c0b8cf2b2c60ea09729bc9b7faf464ee67434f45de2bb3d1):

{
   "schemaVersion": 2,
   "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
   "manifests": [
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 1368,
         "digest": "sha256:39832cd8530d791f512f81d43cc83d9e07e14617d89d33b5d779e5454db7bead",
         "platform": {
            "architecture": "amd64",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 1368,
         "digest": "sha256:d6282ec9a8ee0a93fdd3ef688ca4e693dbf02e4634d412fa535a8deec901c84b",
         "platform": {
            "architecture": "arm",
            "os": "linux",
            "variant": "v6"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 1368,
         "digest": "sha256:9f5fc9bc1cdec38adce2ea4ed8e944e4f887edb3ee96d470a023c2f847db2b9c",
         "platform": {
            "architecture": "arm",
            "os": "linux",
            "variant": "v7"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 1368,
         "digest": "sha256:625cc2937a84e498b32acc473e4ebbfc6547020491044ac8bf0bd42887759150",
         "platform": {
            "architecture": "arm64",
            "os": "linux",
            "variant": "v8"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v1+json",
         "size": 10173,
         "digest": "sha256:0cf8ddbe9102f47fcdeb85fb84c66b179ba10a0eba75686fbe455b54f4ef4155",
         "platform": {
            "architecture": "386",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 1368,
         "digest": "sha256:ca9d2e15059ec4462bfeef37b4f8177f144edaca32fec207b63684450ae1e2df",
         "platform": {
            "architecture": "ppc64le",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 1368,
         "digest": "sha256:efc0e3f0860f416ca7c0bdd405e2b8fee0a7db7df4c0d6627ca4dcc2345e1cb2",
         "platform": {
            "architecture": "s390x",
            "os": "linux"
         }
      }
   ]
}

If I use the docker image above, it works fine.
docker run --rm weshigbee/manifest-tool inspect index.docker.io/python:3.6-alpine

It only fails if I run it direct on my Mac.
docker manifest inspect index.docker.io/python:3.6-alpine

Could the issue be this rogue v1 for linux?

      {
         "mediaType": "application/vnd.docker.distribution.manifest.v1+json",
         "size": 10173,
         "digest": "sha256:0cf8ddbe9102f47fcdeb85fb84c66b179ba10a0eba75686fbe455b54f4ef4155",
         "platform": {
            "architecture": "386",
            "os": "linux"
         }
      },

If I look at the output of this docker run --rm weshigbee/manifest-tool inspect index.docker.io/python:3.5-alpine on my Mac, all the manifests are the same version. "application/vnd.docker.distribution.manifest.v2+json"

The output of this shows one manifest that has a different version.
docker run --rm weshigbee/manifest-tool inspect index.docker.io/python:3.6-alpine

5    Mfst Type: application/vnd.docker.distribution.manifest.v1+json
5       Digest: sha256:0cf8ddbe9102f47fcdeb85fb84c66b179ba10a0eba75686fbe455b54f4ef4155
5  Mfst Length: 10173
5     Platform:
5           -      OS: linux
5           -    Arch: 386
5           - Variant:
5           - Feature:
5     # Layers: 0

This is the same as docker-library/golang#269. In other words, this was a quirk the Docker Hub had when we were pushing images and we can't control whether it is pushed as manifest V2 schema 1 or manifest V2 schema 2.

This is the same as docker-library/golang#269. In other words, this was a quirk the Docker Hub had when we were pushing images and we can't control whether it is pushed as manifest V2 schema 1 or manifest V2 schema 2.

Thanks. That sucks. So are you saying that pushing images is non-deterministic or was it just a blip and republishing should fix it?

Anybody know who would be responsible for re-pushing the images? I feel like Python3.6 isn't old enough to simply neglect.

python:3.6-alpine is fixed :+1:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ElianoMarques picture ElianoMarques  ·  5Comments

zybjcdl picture zybjcdl  ·  4Comments

JulienPalard picture JulienPalard  ·  3Comments

rspeer picture rspeer  ·  3Comments

NoirPi picture NoirPi  ·  4Comments