[CI:DOCS] Format manual page documents

- Add a prompt to the skopeo commands.

- Add a "console" identifier to fenced code
blocks which has a prompt, not "sh".

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
This commit is contained in:
Toshiki Sonoda 2023-01-25 17:07:06 +09:00
parent b3b2c73764
commit 83bcd13659
11 changed files with 53 additions and 54 deletions

View File

@ -219,12 +219,12 @@ The password to access the destination registry.
## EXAMPLES ## EXAMPLES
To just copy an image from one registry to another: To just copy an image from one registry to another:
```sh ```console
$ skopeo copy docker://quay.io/skopeo/stable:latest docker://registry.example.com/skopeo:latest $ skopeo copy docker://quay.io/skopeo/stable:latest docker://registry.example.com/skopeo:latest
``` ```
To copy the layers of the docker.io busybox image to a local directory: To copy the layers of the docker.io busybox image to a local directory:
```sh ```console
$ mkdir -p /var/lib/images/busybox $ mkdir -p /var/lib/images/busybox
$ skopeo copy docker://busybox:latest dir:/var/lib/images/busybox $ skopeo copy docker://busybox:latest dir:/var/lib/images/busybox
$ ls /var/lib/images/busybox/* $ ls /var/lib/images/busybox/*
@ -234,46 +234,45 @@ $ ls /var/lib/images/busybox/*
``` ```
To create an archive consumable by `docker load` (but note that using a registry is almost always more efficient): To create an archive consumable by `docker load` (but note that using a registry is almost always more efficient):
```sh ```console
$ skopeo copy docker://busybox:latest docker-archive:archive-file.tar:busybox:latest $ skopeo copy docker://busybox:latest docker-archive:archive-file.tar:busybox:latest
``` ```
To copy and sign an image: To copy and sign an image:
```console
```sh $ skopeo copy --sign-by dev@example.com containers-storage:example/busybox:streaming docker://example/busybox:gold
# skopeo copy --sign-by dev@example.com containers-storage:example/busybox:streaming docker://example/busybox:gold
``` ```
To encrypt an image: To encrypt an image:
```sh ```console
skopeo copy docker://docker.io/library/nginx:1.17.8 oci:local_nginx:1.17.8 $ skopeo copy docker://docker.io/library/nginx:1.17.8 oci:local_nginx:1.17.8
openssl genrsa -out private.key 1024 $ openssl genrsa -out private.key 1024
openssl rsa -in private.key -pubout > public.key $ openssl rsa -in private.key -pubout > public.key
skopeo copy --encryption-key jwe:./public.key oci:local_nginx:1.17.8 oci:try-encrypt:encrypted $ skopeo copy --encryption-key jwe:./public.key oci:local_nginx:1.17.8 oci:try-encrypt:encrypted
``` ```
To decrypt an image: To decrypt an image:
```sh ```console
skopeo copy --decryption-key ./private.key oci:try-encrypt:encrypted oci:try-decrypt:decrypted $ skopeo copy --decryption-key ./private.key oci:try-encrypt:encrypted oci:try-decrypt:decrypted
``` ```
To copy encrypted image without decryption: To copy encrypted image without decryption:
```sh ```console
skopeo copy oci:try-encrypt:encrypted oci:try-encrypt-copy:encrypted $ skopeo copy oci:try-encrypt:encrypted oci:try-encrypt-copy:encrypted
``` ```
To decrypt an image that requires more than one key: To decrypt an image that requires more than one key:
```sh ```console
skopeo copy --decryption-key ./private1.key --decryption-key ./private2.key --decryption-key ./private3.key oci:try-encrypt:encrypted oci:try-decrypt:decrypted $ skopeo copy --decryption-key ./private1.key --decryption-key ./private2.key --decryption-key ./private3.key oci:try-encrypt:encrypted oci:try-decrypt:decrypted
``` ```
Container images can also be partially encrypted by specifying the index of the layer. Layers are 0-indexed indices, with support for negative indexing. i.e. 0 is the first layer, -1 is the last layer. Container images can also be partially encrypted by specifying the index of the layer. Layers are 0-indexed indices, with support for negative indexing. i.e. 0 is the first layer, -1 is the last layer.
Let's say out of 3 layers that the image `docker.io/library/nginx:1.17.8` is made up of, we only want to encrypt the 2nd layer, Let's say out of 3 layers that the image `docker.io/library/nginx:1.17.8` is made up of, we only want to encrypt the 2nd layer,
```sh ```console
skopeo copy --encryption-key jwe:./public.key --encrypt-layer 1 oci:local_nginx:1.17.8 oci:try-encrypt:encrypted $ skopeo copy --encryption-key jwe:./public.key --encrypt-layer 1 oci:local_nginx:1.17.8 oci:try-encrypt:encrypted
``` ```
## SEE ALSO ## SEE ALSO

View File

@ -85,7 +85,7 @@ The password to access the registry.
## EXAMPLES ## EXAMPLES
Mark image example/pause for deletion from the registry.example.com registry: Mark image example/pause for deletion from the registry.example.com registry:
```sh ```console
$ skopeo delete docker://registry.example.com/example/pause:latest $ skopeo delete docker://registry.example.com/example/pause:latest
``` ```
See above for additional details on using the command **delete**. See above for additional details on using the command **delete**.

View File

@ -35,7 +35,7 @@ Do not use this option if at all avoidable.
## EXAMPLES ## EXAMPLES
```sh ```console
$ skopeo generate-sigstore-key --output-prefix mykey $ skopeo generate-sigstore-key --output-prefix mykey
``` ```

View File

@ -87,7 +87,7 @@ Do not list the available tags from the repository in the output. When `true`, t
## EXAMPLES ## EXAMPLES
To review information for the image fedora from the docker.io registry: To review information for the image fedora from the docker.io registry:
```sh ```console
$ skopeo inspect docker://docker.io/fedora $ skopeo inspect docker://docker.io/fedora
{ {
@ -126,7 +126,7 @@ $ skopeo inspect docker://docker.io/fedora
``` ```
To inspect python from the docker.io registry and not show the available tags: To inspect python from the docker.io registry and not show the available tags:
```sh ```console
$ skopeo inspect --no-tags docker://docker.io/library/python $ skopeo inspect --no-tags docker://docker.io/library/python
{ {
"Name": "docker.io/library/python", "Name": "docker.io/library/python",
@ -165,12 +165,12 @@ $ skopeo inspect --no-tags docker://docker.io/library/python
} }
``` ```
``` ```console
$ /bin/skopeo inspect --config docker://registry.fedoraproject.org/fedora --format "{{ .Architecture }}" $ /bin/skopeo inspect --config docker://registry.fedoraproject.org/fedora --format "{{ .Architecture }}"
amd64 amd64
``` ```
``` ```console
$ /bin/skopeo inspect --format '{{ .Env }}' docker://registry.access.redhat.com/ubi8 $ /bin/skopeo inspect --format '{{ .Env }}' docker://registry.access.redhat.com/ubi8
[PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin container=oci] [PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin container=oci]
``` ```

View File

@ -79,7 +79,7 @@ This commands refers to repositories using a _transport_`:`_details_ format. The
### Docker Transport ### Docker Transport
To get the list of tags in the "fedora" repository from the docker.io registry (the repository name expands to "library/fedora" per docker transport canonical form): To get the list of tags in the "fedora" repository from the docker.io registry (the repository name expands to "library/fedora" per docker transport canonical form):
```sh ```console
$ skopeo list-tags docker://docker.io/fedora $ skopeo list-tags docker://docker.io/fedora
{ {
"Repository": "docker.io/library/fedora", "Repository": "docker.io/library/fedora",
@ -110,7 +110,7 @@ $ skopeo list-tags docker://docker.io/fedora
To list the tags in a local host docker/distribution registry on port 5000, in this case for the "fedora" repository: To list the tags in a local host docker/distribution registry on port 5000, in this case for the "fedora" repository:
```sh ```console
$ skopeo list-tags docker://localhost:5000/fedora $ skopeo list-tags docker://localhost:5000/fedora
{ {
"Repository": "localhost:5000/fedora", "Repository": "localhost:5000/fedora",
@ -127,7 +127,7 @@ $ skopeo list-tags docker://localhost:5000/fedora
To list the tags in a local docker-archive file: To list the tags in a local docker-archive file:
```sh ```console
$ skopeo list-tags docker-archive:/tmp/busybox.tar.gz $ skopeo list-tags docker-archive:/tmp/busybox.tar.gz
{ {
"Tags": [ "Tags": [
@ -138,7 +138,7 @@ $ skopeo list-tags docker-archive:/tmp/busybox.tar.gz
Also supports more than one tags in an archive: Also supports more than one tags in an archive:
```sh ```console
$ skopeo list-tags docker-archive:/tmp/docker-two-images.tar.gz $ skopeo list-tags docker-archive:/tmp/docker-two-images.tar.gz
{ {
"Tags": [ "Tags": [
@ -150,7 +150,7 @@ $ skopeo list-tags docker-archive:/tmp/docker-two-images.tar.gz
Will include a source-index entry for each untagged image: Will include a source-index entry for each untagged image:
```sh ```console
$ skopeo list-tags docker-archive:/tmp/four-tags-with-an-untag.tar $ skopeo list-tags docker-archive:/tmp/four-tags-with-an-untag.tar
{ {
"Tags": [ "Tags": [

View File

@ -57,41 +57,41 @@ Write more detailed information to stdout
## EXAMPLES ## EXAMPLES
``` ```console
$ skopeo login docker.io $ skopeo login docker.io
Username: testuser Username: testuser
Password: Password:
Login Succeeded! Login Succeeded!
``` ```
``` ```console
$ skopeo login -u testuser -p testpassword localhost:5000 $ skopeo login -u testuser -p testpassword localhost:5000
Login Succeeded! Login Succeeded!
``` ```
``` ```console
$ skopeo login --authfile authdir/myauths.json docker.io $ skopeo login --authfile authdir/myauths.json docker.io
Username: testuser Username: testuser
Password: Password:
Login Succeeded! Login Succeeded!
``` ```
``` ```console
$ skopeo login --tls-verify=false -u test -p test localhost:5000 $ skopeo login --tls-verify=false -u test -p test localhost:5000
Login Succeeded! Login Succeeded!
``` ```
``` ```console
$ skopeo login --cert-dir /etc/containers/certs.d/ -u foo -p bar localhost:5000 $ skopeo login --cert-dir /etc/containers/certs.d/ -u foo -p bar localhost:5000
Login Succeeded! Login Succeeded!
``` ```
``` ```console
$ skopeo login -u testuser --password-stdin < testpassword.txt docker.io $ skopeo login -u testuser --password-stdin < testpassword.txt docker.io
Login Succeeded! Login Succeeded!
``` ```
``` ```console
$ echo $testpassword | skopeo login -u testuser --password-stdin docker.io $ echo $testpassword | skopeo login -u testuser --password-stdin docker.io
Login Succeeded! Login Succeeded!
``` ```

View File

@ -35,17 +35,17 @@ Require HTTPS and verify certificates when talking to the container registry or
## EXAMPLES ## EXAMPLES
``` ```console
$ skopeo logout docker.io $ skopeo logout docker.io
Remove login credentials for docker.io Remove login credentials for docker.io
``` ```
``` ```console
$ skopeo logout --authfile authdir/myauths.json docker.io $ skopeo logout --authfile authdir/myauths.json docker.io
Remove login credentials for docker.io Remove login credentials for docker.io
``` ```
``` ```console
$ skopeo logout --all $ skopeo logout --all
Remove login credentials for all registries Remove login credentials for all registries
``` ```

View File

@ -18,7 +18,7 @@ Print usage statement
## EXAMPLES ## EXAMPLES
```sh ```console
$ skopeo manifest-digest manifest.json $ skopeo manifest-digest manifest.json
sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6 sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6
``` ```

View File

@ -31,7 +31,7 @@ The passphare to use when signing with the key ID from `--sign-by`. Only the fir
## EXAMPLES ## EXAMPLES
```sh ```console
$ skopeo standalone-sign busybox-manifest.json registry.example.com/example/busybox 1D8230F6CDB6A06716E414C1DB72F2188BB46CC8 --output busybox.signature $ skopeo standalone-sign busybox-manifest.json registry.example.com/example/busybox 1D8230F6CDB6A06716E414C1DB72F2188BB46CC8 --output busybox.signature
$ $
``` ```

View File

@ -30,7 +30,7 @@ Print usage statement
## EXAMPLES ## EXAMPLES
```sh ```console
$ skopeo standalone-verify busybox-manifest.json registry.example.com/example/busybox 1D8230F6CDB6A06716E414C1DB72F2188BB46CC8 busybox.signature $ skopeo standalone-verify busybox-manifest.json registry.example.com/example/busybox 1D8230F6CDB6A06716E414C1DB72F2188BB46CC8 busybox.signature
Signature verified, digest sha256:20bf21ed457b390829cdbeec8795a7bea1626991fda603e0d01b4e7f60427e55 Signature verified, digest sha256:20bf21ed457b390829cdbeec8795a7bea1626991fda603e0d01b4e7f60427e55
``` ```

View File

@ -133,7 +133,7 @@ The password to access the destination registry.
## EXAMPLES ## EXAMPLES
### Synchronizing to a local directory ### Synchronizing to a local directory
``` ```console
$ skopeo sync --src docker --dest dir registry.example.com/busybox /media/usb $ skopeo sync --src docker --dest dir registry.example.com/busybox /media/usb
``` ```
Images are located at: Images are located at:
@ -151,7 +151,7 @@ Images are located at:
/media/usb/busybox:1-glibc /media/usb/busybox:1-glibc
``` ```
Sync run Sync run
``` ```console
$ skopeo sync --src dir --dest docker /media/usb/busybox:1-glibc my-registry.local.lan/test/ $ skopeo sync --src dir --dest docker /media/usb/busybox:1-glibc my-registry.local.lan/test/
``` ```
Destination registry content: Destination registry content:
@ -161,7 +161,7 @@ my-registry.local.lan/test/busybox 1-glibc
``` ```
### Synchronizing to a local directory, scoped ### Synchronizing to a local directory, scoped
``` ```console
$ skopeo sync --src docker --dest dir --scoped registry.example.com/busybox /media/usb $ skopeo sync --src docker --dest dir --scoped registry.example.com/busybox /media/usb
``` ```
Images are located at: Images are located at:
@ -174,8 +174,8 @@ Images are located at:
``` ```
### Synchronizing to a container registry ### Synchronizing to a container registry
``` ```console
skopeo sync --src docker --dest docker registry.example.com/busybox my-registry.local.lan $ skopeo sync --src docker --dest docker registry.example.com/busybox my-registry.local.lan
``` ```
Destination registry content: Destination registry content:
``` ```
@ -184,8 +184,8 @@ registry.local.lan/busybox 1-glibc, 1-musl, 1-ubuntu, ..., latest
``` ```
### Synchronizing to a container registry keeping the repository ### Synchronizing to a container registry keeping the repository
``` ```console
skopeo sync --src docker --dest docker registry.example.com/repo/busybox my-registry.local.lan/repo $ skopeo sync --src docker --dest docker registry.example.com/repo/busybox my-registry.local.lan/repo
``` ```
Destination registry content: Destination registry content:
``` ```
@ -194,8 +194,8 @@ registry.local.lan/repo/busybox 1-glibc, 1-musl, 1-ubuntu, ..., latest
``` ```
### Synchronizing to a container registry with tag suffix ### Synchronizing to a container registry with tag suffix
``` ```console
skopeo sync --src docker --dest docker --append-suffix '-mirror' registry.example.com/busybox my-registry.local.lan $ skopeo sync --src docker --dest docker --append-suffix '-mirror' registry.example.com/busybox my-registry.local.lan
``` ```
Destination registry content: Destination registry content:
``` ```
@ -227,8 +227,8 @@ quay.io:
- latest - latest
``` ```
If the yaml filename is `sync.yml`, sync run: If the yaml filename is `sync.yml`, sync run:
``` ```console
skopeo sync --src yaml --dest docker sync.yml my-registry.local.lan/repo/ $ skopeo sync --src yaml --dest docker sync.yml my-registry.local.lan/repo/
``` ```
This will copy the following images: This will copy the following images:
- Repository `registry.example.com/busybox`: all images, as no tags are specified. - Repository `registry.example.com/busybox`: all images, as no tags are specified.