docker / cli

The Docker CLI
Apache License 2.0
4.93k stars 1.93k forks source link

docker manifest create returns 'no such manifest' #2396

Open rur0 opened 4 years ago

rur0 commented 4 years ago

Description docker manifest create returns 'no such manifest'

Steps to reproduce the issue:

  1. build docker multiple docker images
  2. create a docker manifest with created docker images
  3. error

Describe the results you received:

no such manifest: 192.168.5.223:5000/authserver-amd64:v0.0.1

Describe the results you expected: As described by the docs, to be able to push this manifest to a docker registry and use the multiarch image

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker version:

Client:
 Version:           19.03.7-ce
 API version:       1.40
 Go version:        go1.14
 Git commit:        7141c199a2
 Built:             Fri Mar  6 12:42:12 2020
 OS/Arch:           linux/amd64
 Experimental:      true

Server:
 Engine:
  Version:          19.03.7-ce
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.14
  Git commit:       7141c199a2
  Built:            Fri Mar  6 12:41:47 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.3.3.m
  GitCommit:        d76c121f76a5fc8a462dc64594aea72fe18e1178.m
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

Output of docker info:

Client:
 Debug Mode: false

Server:
 Containers: 2
  Running: 0
  Paused: 0
  Stopped: 2
 Images: 98
 Server Version: 19.03.7-ce
 Storage Driver: overlay2
  Backing Filesystem: <unknown>
  Supports d_type: true
  Native Overlay Diff: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 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: runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: d76c121f76a5fc8a462dc64594aea72fe18e1178.m
 runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
 init version: fec3683
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 5.5.8-1-MANJARO
 Operating System: Manjaro Linux
 OSType: linux
 Architecture: x86_64
 CPUs: 16
 Total Memory: 15.65GiB
 Name: pc
 ID: TG4H:YFRI:Q74H:LFVA:FALY:IFXO:GU2R:HYMC:YVVN:ZZME:4YWY:3PDN
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  192.168.5.223:5000
  127.0.0.0/8
 Live Restore Enabled: false

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

MarcusWichelmann commented 4 years ago

Is there any fix for this? I ran into the same issue when trying to create a manifest, on my local machine, as well as on GitHub workflows: https://github.com/MarcusWichelmann/PrometheusSolarExporter/runs/606703836

My script:

docker tag image:amd64 $IMAGE_ID:$BRANCH_OR_TAG-amd64
docker tag image:arm32v7 $IMAGE_ID:$BRANCH_OR_TAG-arm32v7
docker tag image:arm64v8 $IMAGE_ID:$BRANCH_OR_TAG-arm64v8

docker push $IMAGE_ID:$BRANCH_OR_TAG-amd64
docker push $IMAGE_ID:$BRANCH_OR_TAG-arm32v7
docker push $IMAGE_ID:$BRANCH_OR_TAG-arm64v8

docker manifest create $IMAGE_ID:$BRANCH_OR_TAG $IMAGE_ID:$BRANCH_OR_TAG-amd64 $IMAGE_ID:$BRANCH_OR_TAG-arm32v7 $IMAGE_ID:$BRANCH_OR_TAG-arm64v8
 --> no such manifest
adamsteinbok commented 4 years ago

To help anyone who's having this issue with an 'insecure' registry: adding the --insecure flag to my create command resolved this for me.

adamsteinbok commented 4 years ago

A quick look at the source indicates that the error messages that are actually helpful in this case are hidden behind debug logging.

rur0 commented 4 years ago

@adamsteinbok Thanks for the help, it looks like you do need to add --insecure flag when creating manifest on a insecure registry.

I had added

{
  "insecure-registries": ["registry_ip:port"]
}

in /etc/docker/daemon.json and ~/.docker/config.json; assuming it would trickle down to all commands.

however, now I am getting this:

$ docker manifest push --insecure 192.168.5.3:31000/authservice                                                                       
failed to configure transport: error pinging v2 registry: Get "https://192.168.5.3:31000/v2/": http: server gave HTTP response to HTTPS client
adamsteinbok commented 4 years ago

As far as I can tell, you need both the 'insecure-registries' entry in the daemon.json AND the --insecure flag on the client command.

SullivanJia commented 3 years ago

First of all you need to push your docker images which are in manifest list to your remote docker registry ,then pull back those images.After that , you can try 'docker manifest create --insecure xxx/xxx:xx xxx/yyy:yy xxx/zzz:zz ' command .

virtualstaticvoid commented 3 years ago

I've experienced the same issue; needing to push images to a remote registry before being able to create the manifest.

My expectation is that manifest create would behave in a the same way as a build or tag, such that images and manifests can be built locally without needing a remote registry.

This has implications on CI pipelines, since the typical flow is to build and test images and only pushing them on success / release conditions being met.

douglascamata commented 2 years ago

Will this ever be fixed/improved?

znerd commented 2 years ago

Yes, would be great if this could be addressed (no need to push before creating the manifest), and some documentation is provided with best practices.

Alternatively, if it cannot be addressed just yet, it would be great if the current best practice is documented in a way that it's easy to apply to CI workflows (Azure DevOps, GitLab CI, GitHub Actions, Bitbucket Pipelines, etc.)

jjoseph456 commented 1 year ago

Github Enterprise Server does not support manifests for multi-arch containers? Getting multiple failures for GHES