Create manpages for the buildah project
Second pass of manpages, more tweaking to follow. Signed-off-by: TomSweeneyRedHat <tsweney@redhat.com> Closes: #53 Approved by: nalind
This commit is contained in:
parent
ccfa6a8bd4
commit
2fe578c82f
|
@ -15,6 +15,7 @@ dnf install -y \
|
|||
device-mapper-devel \
|
||||
gpgme-devel \
|
||||
libassuan-devel \
|
||||
git \
|
||||
bzip2
|
||||
|
||||
make -C $GOSRC
|
||||
|
|
19
Makefile
19
Makefile
|
@ -3,7 +3,7 @@ PREFIX := $(DESTDIR)/usr/local
|
|||
BINDIR := $(PREFIX)/bin
|
||||
BASHINSTALLDIR=${PREFIX}/share/bash-completion/completions
|
||||
|
||||
all: buildah
|
||||
all: buildah install.tools docs
|
||||
|
||||
buildah: *.go cmd/buildah/*.go
|
||||
go build -o buildah -tags "$(AUTOTAGS) $(TAGS)" ./cmd/buildah
|
||||
|
@ -11,8 +11,13 @@ buildah: *.go cmd/buildah/*.go
|
|||
.PHONY: clean
|
||||
clean:
|
||||
$(RM) buildah
|
||||
$(MAKE) -C docs clean
|
||||
|
||||
# For vendoring to work right, the checkout directory must be such that out top
|
||||
.PHONY: docs
|
||||
docs: ## build the docs on the host
|
||||
$(MAKE) -C docs docs
|
||||
|
||||
# For vendoring to work right, the checkout directory must be such that our top
|
||||
# level is at $GOPATH/src/github.com/projectatomic/buildah.
|
||||
.PHONY: gopath
|
||||
gopath:
|
||||
|
@ -25,6 +30,16 @@ deps: gopath
|
|||
|
||||
install:
|
||||
install -D -m0755 buildah $(BINDIR)/buildah
|
||||
$(MAKE) -C docs install
|
||||
|
||||
|
||||
.PHONY: install.tools
|
||||
|
||||
install.tools: .install.md2man
|
||||
|
||||
.install.md2man:
|
||||
go get github.com/cpuguy83/go-md2man
|
||||
|
||||
|
||||
.PHONY: install.completions
|
||||
install.completions:
|
||||
|
|
42
README.md
42
README.md
|
@ -13,7 +13,47 @@ The buildah package provides a command line tool which can be used to
|
|||
* use the updated contents of the container's root filesystem as a filesystem layer to create a new image
|
||||
* delete a working container
|
||||
|
||||
Future goals include:
|
||||
**Installation notes**
|
||||
|
||||
Prior to installing buildah, install the following packages on your linux distro:
|
||||
* make
|
||||
* golang
|
||||
* bats
|
||||
* btrfs-progs-devel
|
||||
* device-mapper-devel
|
||||
* gpgme-devel
|
||||
* libassuan-devel
|
||||
* git
|
||||
* bzip2
|
||||
|
||||
In Fedora, you can use this command:
|
||||
|
||||
```
|
||||
dnf -y install \
|
||||
make \
|
||||
golang \
|
||||
bats \
|
||||
btrfs-progs-devel \
|
||||
device-mapper-devel \
|
||||
gpgme-devel \
|
||||
libassuan-devel \
|
||||
git \
|
||||
bzip2
|
||||
```
|
||||
|
||||
Then to install buildah follow the steps in this example:
|
||||
|
||||
```
|
||||
mkdir ~/buildah
|
||||
cd ~/buildah
|
||||
export GOPATH=`pwd`
|
||||
git clone https://github.com/projectatomic/buildah ./src/github.com/projectatomic/buildah
|
||||
cd ./src/github.com/projectatomic/buildah
|
||||
make
|
||||
./buildah --help
|
||||
```
|
||||
|
||||
**Future goals include:**
|
||||
* docs
|
||||
* more CI tests
|
||||
* additional CLI commands (build?)
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
MANDIR=/usr/share/man/man1
|
||||
GOMD2MAN = go-md2man
|
||||
|
||||
docs: $(patsubst %.md,%.1,$(wildcard *.md))
|
||||
|
||||
%.1: %.md
|
||||
$(GOMD2MAN) -in $^ -out $@
|
||||
|
||||
.PHONY: install
|
||||
install:
|
||||
install -m 0644 buildah*.1 ${MANDIR}
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
$(RM) $(MANDIR)/buildah*.1
|
||||
$(RM) buildah*.1
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
## buildah-add "March 2017"
|
||||
|
||||
## NAME
|
||||
buildah add - Add the contents of a file, URL, or a directory to the container.
|
||||
|
||||
|
||||
## SYNOPSIS
|
||||
**buildah** **add** **containerID** **SRC** [**DEST**]
|
||||
|
||||
## DESCRIPTION
|
||||
Adds the contents of a file, URL, or a directory to a container's working directory. If a local file appears to be an archive, its contents are extracted and added instead of the archive file itself. If a destination is not specified, the location of the source will be used for the destination.
|
||||
|
||||
## EXAMPLE
|
||||
**buildah add containerID '/myapp/app.conf' '/myapp/app.conf' **
|
||||
**buildah add containerID '/home/myuser/myproject.go' **
|
||||
**buildah add containerID '/home/myuser/myfiles.tar' '/tmp' **
|
||||
**buildah add containerID '/tmp/workingdir' '/tmp/workingdir' **
|
||||
**buildah add containerID 'https://github.com/projectatomic/buildah' '/tmp' **
|
||||
**buildah add containerID 'passwd' 'certs.d' /etc **
|
||||
|
||||
## SEE ALSO
|
||||
buildah(1)
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
## buildah-commit "March 2017"
|
||||
|
||||
## NAME
|
||||
buildah commit - Create an image from a working container.
|
||||
|
||||
|
||||
## SYNOPSIS
|
||||
**buildah** **commit** **containerID** [*command options* [...]]
|
||||
|
||||
## DESCRIPTION
|
||||
Writes a new image using the container's read-write layer and if it is based on an image, the layers of that image are written.
|
||||
|
||||
## OPTIONS
|
||||
|
||||
**--disable-compression**
|
||||
Don't compress the layers.
|
||||
|
||||
**--signature-policy
|
||||
Pathname of the signature policy file to use. This option is generally not recommended for use.
|
||||
|
||||
## EXAMPLE
|
||||
**buildah commit containerID **
|
||||
**buildah commit containerID --disable-compression --signature-policy '/etc/containers/policy.json' **
|
||||
|
||||
## SEE ALSO
|
||||
buildah(1)
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
## buildah-config "March 2017"
|
||||
|
||||
## NAME
|
||||
buildah config - Update image configuration settings.
|
||||
|
||||
|
||||
## SYNOPSIS
|
||||
**buildah** **config** **containerID** [*command options* [...]]
|
||||
|
||||
## DESCRIPTION
|
||||
Update a number of the image's configuration settings such as the
|
||||
name, author, label and more.
|
||||
|
||||
## OPTIONS
|
||||
|
||||
**--annotation *annotation* **
|
||||
Image *annotation* e.g. annotation=*annotation*, for the target image
|
||||
|
||||
**--arch *architecture* **
|
||||
*architecture* of the target image
|
||||
|
||||
**--author *author* **
|
||||
Image *author* contact information
|
||||
|
||||
**--cmd *command* **
|
||||
*command* for containers based on image
|
||||
|
||||
**--created-by *created* **dd
|
||||
Description of how the image was *created* (default: "manual edits")
|
||||
|
||||
**--entrypoint *entry* **
|
||||
*entry* point for containers based on image
|
||||
|
||||
**--env *envar* **
|
||||
Environment variable (*envar*) to set when running containers based on image
|
||||
|
||||
**--label *label* **
|
||||
Image configuration *label* e.g. label=*label*
|
||||
|
||||
**--os *operating system* **
|
||||
Image target *operating system*
|
||||
|
||||
**--port *port* **
|
||||
*port* to expose when running containers based on image
|
||||
|
||||
**--user *user* **
|
||||
*user* to run containers based on image as
|
||||
|
||||
**--volume *volume* **
|
||||
*volume* to create for containers based on image
|
||||
|
||||
**--workingdir *directory* **
|
||||
Initial working *directory* for containers based on image
|
||||
|
||||
## EXAMPLE
|
||||
**buildah config containerID --author='Jane Austen' --workingdir='/etc/mycontainers' **
|
||||
|
||||
## SEE ALSO
|
||||
buildah(1)
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
## buildah-containers "March 2017"
|
||||
|
||||
## NAME
|
||||
buildah containers - List the working containers and their base images.
|
||||
|
||||
|
||||
## SYNOPSIS
|
||||
**buildah** **containers** [*options* [...]]
|
||||
|
||||
## DESCRIPTION
|
||||
Lists containers which appear to be buildah working containers, their names and IDs, and the names and IDs of the images from which they were initialized.
|
||||
|
||||
## OPTIONS
|
||||
|
||||
**--noheading, -n **
|
||||
Omit the table headings from the listing of containers.
|
||||
|
||||
**--notruncate**
|
||||
Do not truncate output.
|
||||
|
||||
**--quiet, -q **
|
||||
Displays only the container image id's.
|
||||
|
||||
## EXAMPLE
|
||||
**buildah containers **
|
||||
**buildah containers --quiet **
|
||||
**buildah containers -q --noheading --notruncate **
|
||||
|
||||
## SEE ALSO
|
||||
buildah(1)
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
## buildah-copy "March 2017"
|
||||
|
||||
## NAME
|
||||
buildah copy - Copies the contents of a file, URL, or directory into a container's working directory.
|
||||
|
||||
|
||||
## SYNOPSIS
|
||||
**buildah** **copy** containerID **SRC** [**DEST**]
|
||||
|
||||
## DESCRIPTION
|
||||
Copies the contents of a file, URL, or a directory to a container's working directory. If a local file appears to be an archive, its contents are extracted and copied instead of the archive file itself. If a destination is not specified, the location of the source will be used for the destination.
|
||||
|
||||
|
||||
|
||||
## EXAMPLE
|
||||
**buildah copy containerID '/myapp/app.conf' '/myapp/app.conf' **
|
||||
**buildah copy containerID '/home/myuser/myproject.go' **
|
||||
**buildah copy containerID '/home/myuser/myfiles.tar' '/tmp' **
|
||||
**buildah copy containerID '/tmp/workingdir' '/tmp/workingdir' **
|
||||
**buildah copy containerID 'https://github.com/projectatomic/buildah' '/tmp' **
|
||||
**buildah copy containerID 'passwd' 'certs.d' /etc **
|
||||
|
||||
## SEE ALSO
|
||||
buildah(1)
|
||||
|
|
@ -1,17 +1,26 @@
|
|||
## buildah-from "March 2017"
|
||||
|
||||
## NAME
|
||||
buildah from - Creates a container image based on the supplied image name. If the supplied image name is "scratch" a new default empty container image will be created.
|
||||
buildah from - Creates a new working container, either from scratch or using a specified image as a starting point.
|
||||
|
||||
|
||||
## SYNOPSIS
|
||||
**buildah** **from** --image *imagename* [*options* [...]]
|
||||
**buildah** **from** *imagename* [*options* [...]]
|
||||
|
||||
## DESCRIPTION
|
||||
Creates a working container based upon the supplied image name. If the supplied image name is "scratch" a new default container will be created.
|
||||
|
||||
## RETURN VALUE
|
||||
The container id of the container that was created. On error, -1 is returned and errno is returned.
|
||||
|
||||
## OPTIONS
|
||||
|
||||
**--mount**
|
||||
Mount the working container printing the mount point upon successful completion.
|
||||
|
||||
**--name** *name*
|
||||
A *name* for the working container
|
||||
|
||||
**--pull**
|
||||
Pull the image if it is not present. If this flag is not specified,the image will not be pulled regardless. Defaults to TRUE.
|
||||
|
||||
|
@ -24,17 +33,12 @@ A prefix to prepend to the image name in order to pull the image. Default value
|
|||
**--signature-policy** *signaturepolicy*
|
||||
The path of the for the signature policy file. The default location is */etc/containers/policy.json* and changing to another file is not recommended.
|
||||
|
||||
**--mount**
|
||||
The working container will be mounted when specified.
|
||||
|
||||
**--link** link
|
||||
Path name of a symbolic link to create to the root directory of the container.
|
||||
|
||||
|
||||
## EXAMPLE
|
||||
**buildah from --image imagename --pull --registry "myregistry://" --mount **
|
||||
**buildah from --image imagename --mount --link ~/mycontainerroot --signature-policy /etc/containers/policy.json **
|
||||
**buildah from --image imagename --pull-always --registry "myregistry://" **
|
||||
**buildah from imagename --pull --registry "myregistry://" --mount **
|
||||
**buildah from imagename --signature-policy /etc/containers/policy.json **
|
||||
**buildah from imagename --pull-always --registry "myregistry://" --name "mycontainer" **
|
||||
|
||||
## SEE ALSO
|
||||
buildah-list(1)
|
||||
buildah(1)
|
||||
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
## buildah-images "March 2017"
|
||||
|
||||
## NAME
|
||||
buildah images - List images in local storage.
|
||||
|
||||
|
||||
## SYNOPSIS
|
||||
**buildah** **images** [*options* [...]]
|
||||
|
||||
## DESCRIPTION
|
||||
Displays locally stored images, their names and IDs, and the names and IDs of the containers.
|
||||
|
||||
## OPTIONS
|
||||
|
||||
**--nodheading, -n **
|
||||
Omit the table headings from the listing of images.
|
||||
|
||||
**--notruncate**
|
||||
Do not truncate output.
|
||||
|
||||
**--quiet, -q **
|
||||
Lists only the container image id's.
|
||||
|
||||
## EXAMPLE
|
||||
**buildah images **
|
||||
**buildah images --quiet **
|
||||
**buildah images -q --noheading --notruncate **
|
||||
|
||||
## SEE ALSO
|
||||
buildah(1)
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
## buildah-mount "March 2017"
|
||||
|
||||
## NAME
|
||||
buildah mount - Mount the working container's root filesystem.
|
||||
|
||||
|
||||
## SYNOPSIS
|
||||
**buildah** **mount** **containerID**
|
||||
|
||||
## DESCRIPTION
|
||||
Mount the container's root file system in a location which can be accessed from the host, and returns the location.
|
||||
|
||||
## RETURN VALUE
|
||||
The location of the mounted file system. On error an empty string and errno is returned.
|
||||
|
||||
## EXAMPLE
|
||||
**buildah mount containerID **
|
||||
**mountFS=buildah mount containerID **
|
||||
|
||||
## SEE ALSO
|
||||
buildah(1)
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
## buildah-rm "March 2017"
|
||||
|
||||
## NAME
|
||||
buildah rm - Removes one or more working containers.
|
||||
|
||||
|
||||
## SYNOPSIS
|
||||
**buildah** **rm** **containerID(s)**
|
||||
|
||||
## DESCRIPTION
|
||||
Removes a working container or containers unmounting them if necessary. Multiple containers are space separated. If multiple containers are passed to this command and the removal fails on one, the containers following that container will not be removed.
|
||||
|
||||
## EXAMPLE
|
||||
**buildah delete containerID **
|
||||
**buildah delete containerID1 containerID2 containerID3 **
|
||||
|
||||
## SEE ALSO
|
||||
buildah(1)
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
## buildah-rmi "March 2017"
|
||||
|
||||
## NAME
|
||||
buildah rmi - Removes one or more images.
|
||||
|
||||
|
||||
## SYNOPSIS
|
||||
**buildah** **rmi** **imageID(s)**
|
||||
|
||||
## DESCRIPTION
|
||||
Removes a locally stored image or images. Multiple images are space separated. If multiple images are passed to this command and the removal fails on one, the images following that image will not be removed.
|
||||
|
||||
## EXAMPLE
|
||||
**buildah rmi imageID **
|
||||
**buildah rmi imageID1 imageID2 imageID3 **
|
||||
|
||||
## SEE ALSO
|
||||
buildah(1)
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
## buildah-run "March 2017"
|
||||
|
||||
## NAME
|
||||
buildah run - Run a command inside of the container.
|
||||
|
||||
|
||||
## SYNOPSIS
|
||||
**buildah** **run** **containerID** [*command options* [...]]
|
||||
|
||||
## DESCRIPTION
|
||||
Launches a container and runs the specified command in that container using the container's root filesystem as a root filesystem, using configuration settings inherited from the container's image or as specified using previous calls to the buildah-config command.
|
||||
|
||||
## OPTIONS
|
||||
|
||||
**--runtime**
|
||||
The *path* to an alternate runtime.
|
||||
|
||||
**--runtime-flag**
|
||||
Adds global flags for the containter rutime.
|
||||
|
||||
|
||||
## EXAMPLE
|
||||
**buildah run containerID 'ps -auxw' **
|
||||
|
||||
## SEE ALSO
|
||||
buildah(1)
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
## buildah-umount "March 2017"
|
||||
|
||||
## NAME
|
||||
buildah umount - Unmount a working container's root file system.
|
||||
|
||||
|
||||
## SYNOPSIS
|
||||
**buildah** **umount** **containerID**
|
||||
|
||||
## DESCRIPTION
|
||||
Unmounts the specified container's root file system.
|
||||
|
||||
|
||||
## EXAMPLE
|
||||
**buildah umount containerID **
|
||||
|
||||
## SEE ALSO
|
||||
buildah(1)
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
## buildah "March 2017"
|
||||
|
||||
## NAME
|
||||
buildah - A command line tool to facilitate working with containers and their images.
|
||||
|
||||
|
||||
## DESCRIPTION
|
||||
The buildah package provides a command line tool which can be used to:
|
||||
|
||||
* Create a working container, either from scratch or using an image as a starting point.
|
||||
* Mount the working container's root filesystem for manipulation.
|
||||
* Unmount the working container's root filesystem.
|
||||
* Use the updated contents of the container's root filesystem as a filesystem layer to create a new image.
|
||||
* Delete a working container or it's image.
|
||||
|
||||
## SEE ALSO
|
||||
| Command | Description |
|
||||
| --------------------- | --------------------------------------------------- |
|
||||
| buildah-add(1) | Add the contents of a file, URL, or a directory to the container. |
|
||||
| buildah-commit(1) | Create an image from a working container. |
|
||||
| buildah-config(1) | Update image configuration settings. |
|
||||
| buildah-containers(1) | List the working containers and their base images. |
|
||||
| buildah-copy(1) | Copies the contents of a file, URL, or directory into a container's working directory. |
|
||||
| buildah-from(1) | Creates a new working container, either from scratch or using a specified image as a starting point. |
|
||||
| buildah-images(1) | List images in local storage. |
|
||||
| buildah-mount(1) | Mount the working container's root filesystem. |
|
||||
| buildah-rm(1) | Removes one or more working containers. |
|
||||
| buildah-rmi(1) | Removes one or more images. |
|
||||
| buildah-run(1) | Run a command inside of the container. |
|
||||
| buildah-umount(1) | Unmount a working container's root file system. |
|
Loading…
Reference in New Issue