-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
docker run with sha #2815
Labels
Milestone
Comments
mergify bot
pushed a commit
to aws/aws-cdk
that referenced
this issue
Oct 29, 2020
Running an image by only providing the hash fails on docker engine v20.10.0-beta1 with invalid repository name. ``` docker run --rm b92402b29db56f1bbace74c369bedef5ee296a76fd8545426255247da70ce21a docker: Error response from daemon: invalid repository name (b92402b29db56f1bbace74c369bedef5ee296a76fd8545426255247da70ce21a), cannot specify 64-byte hexadecimal strings. ``` Using `docker run --rm sha256:b92402b29db56f1bbace74c369bedef5ee296a76fd8545426255247da70ce21a` instead works as expected. I haven't been able to pinpoint the exact change yet as this seems not to be mentioned in https://github.com/docker/docker-ce/blob/0fc7084265b3786a5867ec311d3f916af7bf7a23/CHANGELOG.md Created an issue with docker to clarify whether this is a regression or a planned change docker/cli#2815 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This is an interesting one, and is definitely in $ /usr/bin/docker version
Client: Docker Engine - Community
Version: 19.03.12
API version: 1.40
Go version: go1.13.10
Git commit: 48a66213fe
Built: Mon Jun 22 15:45:50 2020
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 20.10.0-beta1
API version: 1.41 (minimum version 1.12)
Go version: go1.13.15
Git commit: 9c15e82
Built: Tue Oct 13 18:17:18 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.4.1
GitCommit: c623d1b36f09f8ef6536a057bd658b3aa8632828
runc:
Version: 1.0.0-rc92
GitCommit: ff819c7e9184c13b7c2607fe6c30ae19403a7aff
docker-init:
Version: 0.19.0
GitCommit: de40ad0
$ /usr/bin/docker pull bash
Using default tag: latest
latest: Pulling from library/bash
Digest: sha256:01fad26fa8ba21bce6e8c47222acfdb54649957f1e86d53a0c8e03360271abf6
Status: Image is up to date for bash:latest
docker.io/library/bash:latest
$ /usr/bin/docker images --no-trunc bash
REPOSITORY TAG IMAGE ID CREATED SIZE
bash latest sha256:39a95ac320110ef1a6ec21e7751ad39952fdad619fe15725b182cb2e34f92fe4 3 weeks ago 13.1MB
$ /usr/bin/docker run --rm 39a95ac320110ef1a6ec21e7751ad39952fdad619fe15725b182cb2e34f92fe4
docker: Error response from daemon: invalid repository name (39a95ac320110ef1a6ec21e7751ad39952fdad619fe15725b182cb2e34f92fe4), cannot specify 64-byte hexadecimal strings. It works successfully if I remove even one character (because it then becomes a "short ID"). |
I bisected this and it was already fixed with moby/moby#41641 in master @thaJeztah @cpuguy83 |
Thanks @tonistiigi ! (and thanks for reporting @johanneswuerbach 👍) |
Nice, glad I could unknowingly fix that! |
1 task
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Description
docker run
fails to run images by digest without thesha256:
prefix with version 20.10.0-beta1.Steps to reproduce the issue:
Reading the docs it isn't fully clear to me whether this way to run was supported https://docs.docker.com/engine/reference/commandline/run/, but it is also not listed as breaking change in https://github.com/docker/docker-ce/blob/0fc7084265b3786a5867ec311d3f916af7bf7a23/CHANGELOG.md
This change was likely introduced in #1498 where the image is pulled now before being created, while it was just created before.
The text was updated successfully, but these errors were encountered: