-
Notifications
You must be signed in to change notification settings - Fork 456
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
add crictl history command #879
Comments
crictl talks only with CRI API. If the features from docker is not part of CRI API, then it's not possible to add that in crictl. |
Some container runtimes like CRI-O return an additional image info which contains the history:
|
And containerd also does this. But docker (over CRI) does not, so it must be different API ? |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
I implemented "info", including "history", for docker: It looks almost the same, then again CRI doesn't really have any standardization in a lot of different places.
vs containerd @@ -1,48 +1,47 @@
{
"status": {
"id": "sha256:0ac33e5f5afa79e084075e8698a22d574816eea8d7b7d480586835657c3e1c8b",
"repoTags": [
- "docker.io/library/alpine:latest"
+ "alpine:latest"
],
"repoDigests": [
- "docker.io/library/alpine@sha256:4edbd2beb5f78b1014028f4fbb99f3237d9561100b6881aabbf5acce2c4f9454"
+ "alpine@sha256:4edbd2beb5f78b1014028f4fbb99f3237d9561100b6881aabbf5acce2c4f9454"
],
- "size": "2818197",
+ "size": "5574964",
"uid": null,
"username": "",
"spec": null
},
"info": {
- "chainID": "sha256:4fc242d58285699eca05db3cc7c7122a2b8e014d9481f323bd9277baacfa0628",
"imageSpec": {
"created": "2022-04-05T00:19:59.912662499Z",
"architecture": "amd64",
"os": "linux",
"config": {
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"Cmd": [
"/bin/sh"
]
},
"rootfs": {
"type": "layers",
"diff_ids": [
"sha256:4fc242d58285699eca05db3cc7c7122a2b8e014d9481f323bd9277baacfa0628"
]
},
"history": [
{
- "created": "2022-04-05T00:19:59.790636867Z",
+ "created": "2022-04-05T00:19:59Z",
"created_by": "/bin/sh -c #(nop) ADD file:5d673d25da3a14ce1f6cf66e4c7fd4f4b85a3759a9d93efb3fd9ff852b5b56e4 in / "
},
{
- "created": "2022-04-05T00:19:59.912662499Z",
+ "created": "2022-04-05T00:19:59Z",
"created_by": "/bin/sh -c #(nop) CMD [\"/bin/sh\"]",
"empty_layer": true
}
]
}
}
} vs cri-o @@ -1,48 +1,47 @@
{
"status": {
- "id": "0ac33e5f5afa79e084075e8698a22d574816eea8d7b7d480586835657c3e1c8b",
+ "id": "sha256:0ac33e5f5afa79e084075e8698a22d574816eea8d7b7d480586835657c3e1c8b",
"repoTags": [
- "docker.io/library/alpine:latest"
+ "alpine:latest"
],
"repoDigests": [
- "docker.io/library/alpine@sha256:4edbd2beb5f78b1014028f4fbb99f3237d9561100b6881aabbf5acce2c4f9454",
- "docker.io/library/alpine@sha256:a777c9c66ba177ccfea23f2a216ff6721e78a662cd17019488c417135299cd89"
+ "alpine@sha256:4edbd2beb5f78b1014028f4fbb99f3237d9561100b6881aabbf5acce2c4f9454"
],
- "size": "5859398",
+ "size": "5574964",
"uid": null,
"username": "",
"spec": null
},
"info": {
"imageSpec": {
"created": "2022-04-05T00:19:59.912662499Z",
"architecture": "amd64",
"os": "linux",
"config": {
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"Cmd": [
"/bin/sh"
]
},
"rootfs": {
"type": "layers",
"diff_ids": [
"sha256:4fc242d58285699eca05db3cc7c7122a2b8e014d9481f323bd9277baacfa0628"
]
},
"history": [
{
- "created": "2022-04-05T00:19:59.790636867Z",
+ "created": "2022-04-05T00:19:59Z",
"created_by": "/bin/sh -c #(nop) ADD file:5d673d25da3a14ce1f6cf66e4c7fd4f4b85a3759a9d93efb3fd9ff852b5b56e4 in / "
},
{
- "created": "2022-04-05T00:19:59.912662499Z",
+ "created": "2022-04-05T00:19:59Z",
"created_by": "/bin/sh -c #(nop) CMD [\"/bin/sh\"]",
"empty_layer": true
}
]
}
}
} The main difference is the timestamps, docker only does Unix (int64) |
you can use nerdctl image history |
|
Let's close this for now since it's not supported by cri-tools. |
It is supported by |
What would you like to be added:
crictl history command
Why is this needed:
we need show image build information
The text was updated successfully, but these errors were encountered: