Update man page

Resolves https://github.com/projectatomic/skopeo/issues/12

* Convert man page from markdown to nroff
* Fill out man page
* Remove TODO's from go code regarding man page
* Additional information on building instructions
* Update Makfile

Signed-off-by: Jhon Honce <jhonce@redhat.com>
This commit is contained in:
Jhon Honce
2016-04-20 14:47:28 -07:00
parent 918a4d9110
commit eab73f3d51
5 changed files with 108 additions and 22 deletions

View File

@@ -1,4 +1,4 @@
.PHONY: all binary build clean install install-binary man shell test-integration
.PHONY: all binary build clean install install-binary shell test-integration
export GO15VENDOREXPERIMENT=1
@@ -23,7 +23,7 @@ DOCKER_RUN_DOCKER := $(DOCKER_FLAGS) "$(DOCKER_IMAGE)"
GIT_COMMIT := $(shell git rev-parse HEAD 2> /dev/null || true)
all: man binary
all: binary
binary:
go build -ldflags "-X main.gitCommit=${GIT_COMMIT}" -o ${DEST}skopeo .
@@ -33,10 +33,9 @@ build-container:
clean:
rm -f skopeo
rm -f skopeo.1
install: install-binary
install -m 644 skopeo.1 ${MANINSTALLDIR}/man1/
install -m 644 man1/skopeo.1 ${MANINSTALLDIR}/man1/
# TODO(runcom)
#install -m 644 completion/bash/skopeo ${BASHINSTALLDIR}/
@@ -44,8 +43,6 @@ install-binary:
install -d -m 0755 ${INSTALLDIR}
install -m 755 skopeo ${INSTALLDIR}
man:
go-md2man -in man/skopeo.1.md -out skopeo.1
shell: build-container
$(DOCKER_RUN_DOCKER) bash

View File

@@ -89,6 +89,12 @@ $ cd projectatomic
$ git clone https://github.com/projectatomic/skopeo
$ cd skopeo && make binary
```
You may need to install additional development packages: gpgme-devel and libassuan-devel
```sh
# dnf install gpgme-devel libassuan-devel
```
Man:
-
To build the man page you need [`go-md2man`](https://github.com/cpuguy83/go-md2man) available on your system, then:

View File

@@ -1,14 +0,0 @@
% SKOPEO(1)
% Antonio Murdaca
% JANUARY 2016
# NAME
skopeo - Inspect Docker images and repositories on registries
# SYNOPSIS
# DESCRIPTION
# ARGUMENTS
# AUTHORS
Antonio Murdaca <runcom@redhat.com>

99
man1/skopeo.1 Normal file
View File

@@ -0,0 +1,99 @@
.\" To review this file formatted
.\" groff -man -Tascii skopeo.1
.\"
.de FN
\fI\|\\$1\|\fP
..
.TH "skopeo" "1" "2016-04-21" "Linux" "Linux Programmer's Manual"
.SH NAME
skopeo \(em Inspect Docker images and repositories on registries
.SH SYNOPSIS
\fBskopeo inspect\fR image-name [\fB--raw\fR]
.PP
\fBskopeo layers\fR image-name
.PP
\fBskopeo standalone-sign\fR manifest docker-reference key-fingerprint \%\fB--output\fR|\fB-o\fR signature
.PP
\fBskopeo standalone-verify\fR manifest docker-reference key-fingerprint \%signature
.PP
\fBskopeo help\fR [command]
.SH DESCRIPTION
\fBskopeo\fR is a command line utility which is able to inspect a repository on a Docker registry and fetch images
layers. It fetches the repository's manifest and it is able to show you a `docker inspect`-like json output about a
whole repository or a tag. This tool, in contrast to docker inspect, helps you gather useful information about a
repository or a tag without requiring you to run `docker pull` - e.g. - which tags are available for the given
repository? which labels the image has?
.SH OPTIONS
.B "--debug"
enable debug output
.PP
.B ""--username"
Username to use to authenicate to the given registry
.PP
.B --password
Password to use to authenicate to the given registry
.PP
.B "--cert-path"
Path to certificates to use to authenicate to the given registry (cert.pem, key.pem)
.PP
.B "--tls-verify"
Whether to verify certificates or not
.PP
.B "--help, -h"
Show help
.PP
.B "--version, -v"
print the version number
.SH COMMANDS
.TP
.B inspect
Return low-level information on images in a registry
.sp
.B image-name
name of image to retrieve information about
.br
.B "--raw"
output raw manifest, default is to format in JSON
.TP
.B layers
Get image layers
.sp
.B image-name
name of the image to retrieve layers
.TP
.B standalone-sign
Create a signature using local files
.sp
.B manifest
path to file containing manifest of image
.br
.B docker-reference
docker reference of blob to be signed
.br
.B key-fingerprint
key identity to use for signing
.br
.B ""--output, -o"
write signature to given file
.TP
.B standalone-verify
Verify a signature using local files, digest will be printed on success.
.sp
.B manifest
Path to file containing manifest of image
.br
.B docker-reference
docker reference of signed blob
.br
.B key-fingerprint
key identity to use for verification
.br
.B signature
Path to file containing signature
.TP
.B help
show help for \fBskopeo\fR
.SH AUTHORS
Antonio Murdaca <runcom@redhat.com>

View File

@@ -37,7 +37,6 @@ func standaloneSign(context *cli.Context) {
}
}
// FIXME: Document in the man page
var standaloneSignCmd = cli.Command{
Name: "standalone-sign",
Usage: "Create a signature using local files",
@@ -80,7 +79,6 @@ func standaloneVerify(context *cli.Context) {
fmt.Printf("Signature verified, digest %s\n", sig.DockerManifestDigest)
}
// FIXME: Document in the man page
var standaloneVerifyCmd = cli.Command{
Name: "standalone-verify",
Usage: "Verify a signature using local files",