Commit 5a849d1
committed
commit: always return the config digest as the image ID
When committing, if we didn't get an image ID off the bat because the
image wasn't being committed to local storage, try to return the image's
configuration blob digest, which is what is traditionally used as the
image's ID.
This allows the --iidfile flag to write a value to a file in situations
where the image isn't being written to local storage. The image ID is
of limited value in these cases, since we can't use it to look up the
image anywhere else, but at least we don't write a file that just has
the digest name prefix or log an empty string.
Signed-off-by: Nalin Dahyabhai <[email protected]>1 parent ac90794 commit 5a849d1
3 files changed
+41
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
531 | 531 | | |
532 | 532 | | |
533 | 533 | | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
534 | 544 | | |
535 | 545 | | |
536 | 546 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1086 | 1086 | | |
1087 | 1087 | | |
1088 | 1088 | | |
1089 | | - | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
1090 | 1094 | | |
1091 | 1095 | | |
1092 | 1096 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8958 | 8958 | | |
8959 | 8959 | | |
8960 | 8960 | | |
| 8961 | + | |
| 8962 | + | |
| 8963 | + | |
| 8964 | + | |
| 8965 | + | |
| 8966 | + | |
| 8967 | + | |
| 8968 | + | |
| 8969 | + | |
| 8970 | + | |
| 8971 | + | |
| 8972 | + | |
| 8973 | + | |
| 8974 | + | |
| 8975 | + | |
| 8976 | + | |
| 8977 | + | |
| 8978 | + | |
| 8979 | + | |
| 8980 | + | |
| 8981 | + | |
| 8982 | + | |
| 8983 | + | |
| 8984 | + | |
| 8985 | + | |
| 8986 | + | |
0 commit comments