Warn that docker-archive and oci-archive overwrite the whole file

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
Miloslav Trmač 2024-06-28 22:30:24 +02:00
parent ef9ce46684
commit a170fe3280
1 changed files with 9 additions and 2 deletions

View File

@ -54,13 +54,17 @@ If the first component of name is not recognized as a _hostname_[`:`_port_], _na
### **docker-archive:**_path_[`:`{_docker-reference_|`@`_source-index_}]
An image is stored in the docker-save(1) formatted file.
Unless a tool explicitly documents otherwise,
a write to a **docker-archive:** destination completely overwrites _path_, replacing it with the single provided image.
The _path_ can refer to a stream, e.g. `docker-archive:/dev/stdin`.
_docker-reference_ must not contain a digest.
Alternatively, for reading archives, `@`_source-index_ is a zero-based index in archive manifest
(to access untagged images).
If neither _docker-reference_ nor `@`_source_index is specified when reading an archive, the archive must contain exactly one image.
The _path_ can refer to a stream, e.g. `docker-archive:/dev/stdin`.
### **docker-daemon:**_docker-reference_|_algo_`:`_digest_
An image stored in the docker daemon's internal storage.
@ -79,6 +83,9 @@ If _reference_ is not specified when reading an image, the directory must contai
An image in a tar(1) archive with contents compliant with the "Open Container Image Layout Specification" at _path_.
Unless a tool explicitly documents otherwise,
a write to an **oci-archive:** destination completely overwrites _path_, replacing it with the single provided image.
The _path_ value terminates at the first `:` character; any further `:` characters are not separators, but a part of _reference_.
The _reference_ is used to set, or match, the `org.opencontainers.image.ref.name` annotation in the top-level index.
If _reference_ is not specified when reading an archive, the archive must contain exactly one image.