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

[feature request] create container using image ID with digest algorithm prefix #1348

Closed
YaoZengzeng opened this issue May 17, 2018 · 0 comments · Fixed by #1351
Closed

[feature request] create container using image ID with digest algorithm prefix #1348

YaoZengzeng opened this issue May 17, 2018 · 0 comments · Fixed by #1351
Assignees
Labels
kind/feature kind/feature-request This is a feature request from community for PouchContainer

Comments

@YaoZengzeng
Copy link
Contributor

Ⅰ. Issue Description

Docker is able to run a container using image ID with digest algorithm prefix as follows:

[root@VM_68_206_centos pouch]# docker inspect busybox
[
    {
        "Id": "sha256:8ac48589692a53a9b8c2d1ceaa6b402665aa7fe667ba51ccc03002300856d8c7",
        "RepoTags": [
            "docker.io/busybox:latest"
        ],
       .....
}
[root@VM_68_206_centos pouch]# docker run -it sha256:8ac48589692a53a9b8c2d1ceaa6b402665aa7fe667ba51ccc03002300856d8c7
/ # 

But pouch can't:

[root@VM_68_206_centos ~]# pouch image inspect busybox
[
    {
        "Architecture": "amd64",
        "Config": {
            "Cmd": [
                "sh"
            ],
        .....
        "Id": "sha256:8ac48589692a53a9b8c2d1ceaa6b402665aa7fe667ba51ccc03002300856d8c7",
        .....
}
]
[root@VM_68_206_centos ~]# pouch run sha256:8ac48589692a53a9b8c2d1ceaa6b402665aa7fe667ba51ccc03002300856d8c7
Error: failed to run container: {"message":"image: registry.hub.docker.com/library/sha256:8ac48589692a53a9b8c2d1ceaa6b402665aa7fe667ba51ccc03002300856d8c7: not found"}

We need this feature as k8s 1.10+ will use image inspect to get the image ID, and then use it to create container. However the image ID get from image inspect has digest algorithm prefix like sha:

Ⅱ. Describe what happened

Ⅲ. Describe what you expected to happen

Ⅳ. How to reproduce it (as minimally and precisely as possible)

Ⅴ. Anything else we need to know?

Ⅵ. Environment:

  • pouch version (use pouch version):
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:
@pouchrobot pouchrobot added kind/feature kind/feature-request This is a feature request from community for PouchContainer labels May 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature kind/feature-request This is a feature request from community for PouchContainer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants