Restructure documentation dir

Restructuring the docs dir to make integration with sphinx easier.  man
pages now exist in docs/source/man and the sphinx make files exists in
docs.

Signed-off-by: baude <bbaude@redhat.com>
This commit is contained in:
baude
2019-10-24 14:54:57 -05:00
parent 5af166ff51
commit 52b92023ed
128 changed files with 228 additions and 327 deletions

View File

@ -3,7 +3,7 @@ export GOPROXY=https://proxy.golang.org
GO ?= go
DESTDIR ?=
EPOCH_TEST_COMMIT ?= 2b0892e757c878cdb087dd22b8986bccef0276ed
EPOCH_TEST_COMMIT ?= ac73fd3fe5dcbf2647d589f9c9f37fe9531ed663
HEAD ?= HEAD
CHANGELOG_BASE ?= HEAD~
CHANGELOG_TARGET ?= HEAD
@ -205,9 +205,7 @@ clean: ## Clean artifacts
libpod/pod_ffjson.go \
libpod/container_easyjson.go \
libpod/pod_easyjson.go \
$(MANPAGES) ||:
find . -name \*~ -delete
find . -name \#\* -delete
docs/build
libpodimage: ## Build the libpod image
${CONTAINER_RUNTIME} build -t ${LIBPOD_IMAGE} .
@ -312,13 +310,17 @@ install.catatonit:
test-binaries: test/checkseccomp/checkseccomp test/goecho/goecho install.catatonit
MANPAGES_MD ?= $(wildcard docs/*.md pkg/*/docs/*.md)
MANPAGES_MD ?= $(wildcard docs/source/man/*.md pkg/*/docs/*.md)
MANPAGES ?= $(MANPAGES_MD:%.md=%)
MANPAGES_DEST ?= $(subst source,build,$(MANPAGES))
$(MANPAGES): %: %.md .gopathok
@sed -e 's/\((podman.*\.md)\)//' -e 's/\[\(podman.*\)\]/\1/' $< | $(GOMD2MAN) -in /dev/stdin -out $@
@sed -e 's/\((podman.*\.md)\)//' -e 's/\[\(podman.*\)\]/\1/' $< | $(GOMD2MAN) -in /dev/stdin -out $(subst source,build,$@)
docs: $(MANPAGES) ## Generate documentation
docdir:
mkdir -p docs/build/man
docs: docdir $(MANPAGES) ## Generate documentation
install-podman-remote-docs: podman-remote docs
rm -rf docs/remote
@ -408,8 +410,8 @@ install.bin: podman
install.man: docs
install ${SELINUXOPT} -d -m 755 $(DESTDIR)$(MANDIR)/man1
install ${SELINUXOPT} -d -m 755 $(DESTDIR)$(MANDIR)/man5
install ${SELINUXOPT} -m 644 $(filter %.1,$(MANPAGES)) -t $(DESTDIR)$(MANDIR)/man1
install ${SELINUXOPT} -m 644 $(filter %.5,$(MANPAGES)) -t $(DESTDIR)$(MANDIR)/man5
install ${SELINUXOPT} -m 644 $(filter %.1,$(MANPAGES_DEST)) -t $(DESTDIR)$(MANDIR)/man1
install ${SELINUXOPT} -m 644 $(filter %.5,$(MANPAGES_DEST)) -t $(DESTDIR)$(MANDIR)/man5
install ${SELINUXOPT} -m 644 docs/links/*1 -t $(DESTDIR)$(MANDIR)/man1
install.config:
@ -444,16 +446,16 @@ install.systemd:
install ${SELINUXOPT} -m 644 contrib/varlink/podman.conf ${DESTDIR}${TMPFILESDIR}/podman.conf
uninstall:
for i in $(filter %.1,$(MANPAGES)); do \
for i in $(filter %.1,$(MANPAGES_DEST)); do \
rm -f $(DESTDIR)$(MANDIR)/man1/$$(basename $${i}); \
done; \
for i in $(filter %.5,$(MANPAGES)); do \
for i in $(filter %.5,$(MANPAGES_DEST)); do \
rm -f $(DESTDIR)$(MANDIR)/man5/$$(basename $${i}); \
done
.PHONY: .gitvalidation
.gitvalidation: .gopathok
GIT_CHECK_EXCLUDE="./vendor:docs/rtd/make.bat" $(GOBIN)/git-validation -v -run DCO,short-subject,dangling-whitespace -range $(EPOCH_TEST_COMMIT)..$(HEAD)
GIT_CHECK_EXCLUDE="./vendor:docs/make.bat" $(GOBIN)/git-validation -v -run DCO,short-subject,dangling-whitespace -range $(EPOCH_TEST_COMMIT)..$(HEAD)
.PHONY: install.tools
install.tools: .install.gitvalidation .install.gometalinter .install.md2man .install.ginkgo .install.golangci-lint ## Install needed tools

23
docs/Makefile Normal file
View File

@ -0,0 +1,23 @@
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
clean:
rm -fr build/
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

View File

@ -53,9 +53,8 @@ function darwin_fn() {
local markdown=$1
local file=$(basename $markdown)
local dir=$(dirname $markdown)
if [[ -f $dir/links/$file ]]; then
markdown=$dir/links/$file
if [[ -f $dir/../../links/$file ]]; then
markdown=$dir/../../links/$file
fi
install $markdown $TARGET
}

View File

@ -1,123 +0,0 @@
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
clean:
rm -fr build/
rm -f source/man/podman-*.1.md
copy:
cp -v ../podman-attach.1.md source/man/
cp -v ../podman-build.1.md source/man/
cp -v ../podman-commit.1.md source/man/
# container
cp -v ../podman-container-checkpoint.1.md source/man/
cp -v ../podman-container-exists.1.md source/man/
cp -v ../podman-container-restore.1.md source/man/
cp -v ../podman-container-cleanup.1.md source/man/
cp -v ../podman-container-prune.1.md source/man/
cp -v ../podman-container-runlabel.1.md source/man/
cp -v ../podman-cp.1.md source/man/
cp -v ../podman-create.1.md source/man/
cp -v ../podman-diff.1.md source/man/
cp -v ../podman-events.1.md source/man/
cp -v ../podman-exec.1.md source/man/
cp -v ../podman-export.1.md source/man/
# generate
cp -v ../podman-generate-systemd.1.md source/man/
cp -v ../podman-generate-kube.1.md source/man/
# healthcheck
cp -v ../podman-healthcheck-run.1.md source/man/
#cp -v ../podman-help.1.md source/
cp -v ../podman-history.1.md source/man/
# image
cp -v ../podman-image-prune.1.md source/man/
cp -v ../podman-image-tree.1.md source/man/
cp -v ../podman-image-trust.1.md source/man/
cp -v ../podman-image-exists.1.md source/man/
cp -v ../podman-image-sign.1.md source/man/
cp -v ../podman-images.1.md source/man/
cp -v ../podman-import.1.md source/man/
cp -v ../podman-info.1.md source/man/
cp -v ../podman-init.1.md source/man/
cp -v ../podman-inspect.1.md source/man/
cp -v ../podman-kill.1.md source/man/
cp -v ../podman-load.1.md source/man/
cp -v ../podman-login.1.md source/man/
cp -v ../podman-logout.1.md source/man/
cp -v ../podman-logs.1.md source/man/
cp -v ../podman-mount.1.md source/man/
# network
cp -v ../podman-network-create.1.md source/man/
cp -v ../podman-network-ls.1.md source/man/
cp -v ../podman-network-inspect.1.md source/man/
cp -v ../podman-network-rm.1.md source/man/
cp -v ../podman-pause.1.md source/man/
# play
cp -v ../podman-play-kube.1.md source/man/
# pod
cp -v ../podman-pod-create.1.md source/man/
cp -v ../podman-pod-pause.1.md source/man/
cp -v ../podman-pod-rm.1.md source/man/
cp -v ../podman-pod-top.1.md source/man/
cp -v ../podman-pod-exists.1.md source/man/
cp -v ../podman-pod-prune.1.md source/man/
cp -v ../podman-pod-start.1.md source/man/
cp -v ../podman-pod-unpause.1.md source/man/
cp -v ../podman-pod-inspect.1.md source/man/
cp -v ../podman-pod-ps.1.md source/man/
cp -v ../podman-pod-stats.1.md source/man/
cp -v ../podman-pod-kill.1.md source/man/
cp -v ../podman-pod-restart.1.md source/man/
cp -v ../podman-pod-stop.1.md source/man/
cp -v ../podman-port.1.md source/man/
cp -v ../podman-ps.1.md source/man/
cp -v ../podman-pull.1.md source/man/
cp -v ../podman-push.1.md source/man/
cp -v ../podman-restart.1.md source/man/
cp -v ../podman-rm.1.md source/man/
cp -v ../podman-rmi.1.md source/man/
cp -v ../podman-run.1.md source/man/
cp -v ../podman-save.1.md source/man/
cp -v ../podman-search.1.md source/man/
cp -v ../podman-start.1.md source/man/
cp -v ../podman-stats.1.md source/man/
cp -v ../podman-stop.1.md source/man/
# system
cp -v ../podman-system-migrate.1.md source/man/
cp -v ../podman-system-renumber.1.md source/man/
cp -v ../podman-system-df.1.md source/man/
cp -v ../podman-system-prune.1.md source/man/
cp -v ../podman-top.1.md source/man/
cp -v ../podman-umount.1.md source/man/
cp -v ../podman-unpause.1.md source/man/
cp -v ../podman-unshare.1.md source/man/
cp -v ../podman-varlink.1.md source/man/
cp -v ../podman-version.1.md source/man/
# volume
cp -v ../podman-volume-inspect.1.md source/man/
cp -v ../podman-volume-prune.1.md source/man/
cp -v ../podman-volume-create.1.md source/man/
cp -v ../podman-volume-ls.1.md source/man/
cp -v ../podman-volume-rm.1.md source/man/
cp -v ../podman-wait.1.md source/man/
.PHONY: help Makefile copy
html: copy
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

View File

@ -1,6 +0,0 @@
Generate
========
:doc:`kube <podman-generate-kube.1>` Generate Kubernetes pod YAML from a container or pod
:doc:`systemd <podman-generate-systemd.1>` Generate a systemd unit file for a Podman container

View File

@ -1,4 +0,0 @@
HealthCheck
===========
:doc:`run <podman-healthcheck-run.1>` run the health check of a container

View File

@ -1,35 +0,0 @@
Image
=====
:doc:`build <podman-build.1>` Build an image using instructions from Containerfiles
:doc:`exists <podman-image-exists.1>` Check if an image exists in local storage
:doc:`history <podman-history.1>` Show history of a specified image
:doc:`import <podman-import.1>` Import a tarball to create a filesystem image
:doc:`inspect <podman-inspect.1>` Display the configuration of an image
:doc:`list <podman-images.1>` List images in local storage
:doc:`load <podman-load.1>` Load an image from container archive
:doc:`prune <podman-image-prune.1>` Remove unused images
:doc:`pull <podman-pull.1>` Pull an image from a registry
:doc:`push <podman-push.1>` Push an image to a specified destination
:doc:`rm <podman-rmi.1>` Removes one or more images from local storage
:doc:`save <podman-save.1>` Save image to an archive
:doc:`sign <podman-image-sign.1>` Sign an image
:doc:`tag <podman-tag.1>` Add an additional name to a local image
:doc:`tree <podman-image-tree.1>` Prints layer hierarchy of an image in a tree format
:doc:`trust <podman-image-trust.1>` Manage container image trust policy

View File

@ -1,64 +0,0 @@
Manage Containers
=================
:doc:`attach <podman-attach.1>` Attach to a running container
:doc:`checkpoint <podman-container-checkpoint.1>` Checkpoints one or more containers
:doc:`cleanup <podman-container-cleanup.1>` Cleanup network and mountpoints of one or more containers
:doc:`commit <podman-commit.1>` Create new image based on the changed container
:doc:`cp <podman-cp.1>` Copy files/folders between a container and the local filesystem
:doc:`create <podman-create.1>` Create but do not start a container
:doc:`diff <podman-diff.1>` Inspect changes on container's file systems
:doc:`exec <podman-exec.1>` Run a process in a running container
:doc:`exists <podman-exists.1>` Check if a container exists in local storage
:doc:`export <podman-export.1>` Export container's filesystem contents as a tar archive
:doc:`init <podman-init.1>` Initialize one or more containers
:doc:`inspect <podman-inspect.1>` Display the configuration of a container or image
:doc:`kill <podman-kill.1>` Kill one or more running containers with a specific signal
:doc:`list <podman-ps.1>` List containers
:doc:`logs <podman-logs.1>` Fetch the logs of a container
:doc:`mount <podman-mount.1>` Mount a working container's root filesystem
:doc:`pause <podman-pause.1>` Pause all the processes in one or more containers
:doc:`port <podman-port.1>` List port mappings or a specific mapping for the container
:doc:`restart <podman-restart.1>` Restart one or more containers
:doc:`prune <podman-container-prune.1>` Remove all stopped containers
:doc:`restore <podman-container-restore.1>` Restores one or more containers from a checkpoint
:doc:`rm <podman-rm.1>` Remove one or more containers
:doc:`run <podman-run.1>` Run a command in a new container
:doc:`runlabel <podman-container-runlabel.1>` Execute the command described by an image label
:doc:`start <podman-start.1>` Start one or more containers
:doc:`stats <podman-stats.1>` Display a live stream of container resource usage statistics
:doc:`stop <podman-stop.1>` Stop one or more containers
:doc:`top <podman-top.1>` Display the running processes of a container
:doc:`umount <podman-umount.1>` Unmounts working container's root filesystem
:doc:`unpause <podman-unpause.1>` Unpause the processes in one or more containers
:doc:`wait <podman-wait.1>` Block on one or more containers

View File

@ -1,10 +0,0 @@
Network
=====
:doc:`create <podman-network-create.1>` network create
:doc:`inspect <podman-network-inspect.1>` network inspect
:doc:`ls <podman-network-ls.1>` network list
:doc:`rm <podman-network-rm.1>` network rm

View File

@ -1,4 +0,0 @@
Play
====
:doc:`kube <podman-play-kube.1>` Play a pod based on Kubernetes YAML

View File

@ -1,30 +0,0 @@
Pod
===
:doc:`create <podman-pod-create.1>` Create a new empty pod
:doc:`exists <podman-pod-exists.1>` Check if a pod exists in local storage
:doc:`inspect <podman-pod-inspect.1>` Displays a pod configuration
:doc:`kill <podman-pod-kill.1>` Send the specified signal or SIGKILL to containers in pod
:doc:`pause <podman-pause.1>` Pause one or more pods
:doc:`prune <podman-pod-prune.1>` Remove all stopped pods
:doc:`ps <podman-pod-ps.1>` List pods
:doc:`restart <podman-pod-restart.1>` Restart one or more pods
:doc:`rm <podman-pod-rm.1>` Remove one or more pods
:doc:`start <podman-pod-start.1>` Start one or more pods
:doc:`stats <podman-pod-stats.1>` Display a live stream of resource usage statistics for the containers in one or more pods
:doc:`stop <podman-pod-stop.1>` Stop one or more pods
:doc:`top <podman-pod-top.1>` Display the running processes of containers in a pod
:doc:`unpause <podman-pod-unpause.1>` Unpause one or more pods

View File

@ -1,12 +0,0 @@
System
======
:doc:`df <podman-system-df.1>` Show podman disk usage
:doc:`info <podman-info.1>` Display podman system information
:doc:`migrate <podman-system-migrate.1>` Migrate containers
:doc:`prune <podman-system-prune.1>` Remove unused data
:doc:`renumber <podman-system-renumber.1>` Migrate lock numbers

View File

@ -1,11 +0,0 @@
Volume
======
:doc:`create <podman-volume-create.1>` Create a new volume
:doc:`inspect <podman-volume-inspect.1>` Display detailed information on one or more volumes
:doc:`ls <podman-volume-ls.1>` List volumes
:doc:`prune <podman-volume-prune.1>` Remove all unused volumes
:doc:`rm <podman-volume-rm.1>` Remove one or more volumes

View File

@ -8,7 +8,7 @@ Commands
:doc:`commit <man/podman-commit.1>` Create new image based on the changed container
:doc:`containers <man/managecontainers>` Manage Containers
:doc:`containers <managecontainers>` Manage Containers
:doc:`cp <man/podman-cp.1>` Copy files/folders between a container and the local filesystem
@ -22,13 +22,13 @@ Commands
:doc:`export <man/podman-export.1>` Export container's filesystem contents as a tar archive
:doc:`generate <man/generate>` Generated structured data
:doc:`generate <generate>` Generated structured data
:doc:`healthcheck <man/healthcheck>` Manage Healthcheck
:doc:`healthcheck <healthcheck>` Manage Healthcheck
:doc:`history <man/podman-history.1>` Show history of a specified image
:doc:`image <man/image>` Manage images
:doc:`image <image>` Manage images
:doc:`images <man/podman-images.1>` List images in local storage
@ -52,13 +52,13 @@ Commands
:doc:`mount <man/podman-mount.1>` Mount a working container's root filesystem
:doc:`network <man/network>` Manage Networks
:doc:`network <network>` Manage Networks
:doc:`pause <man/podman-pause.1>` Pause all the processes in one or more containers
:doc:`play <man/play>` Play a pod
:doc:`play <play>` Play a pod
:doc:`pod <man/pod>` Manage pods
:doc:`pod <pod>` Manage pods
:doc:`port <man/podman-port.1>` List port mappings or a specific mapping for the container
@ -86,7 +86,7 @@ Commands
:doc:`stop <man/podman-stop.1>` Stop one or more containers
:doc:`system <man/system>` Manage podman
:doc:`system <system>` Manage podman
:doc:`tag <man/podman-tag.1>` Add an additional name to a local image
@ -102,6 +102,6 @@ Commands
:doc:`version <man/podman-version.1>` Display the Podman Version Information
:doc:`volume <man/volume>` Manage volumes
:doc:`volume <volume>` Manage volumes
:doc:`wait <man/podman-wait.1>` Block on one or more containers

6
docs/source/generate.rst Normal file
View File

@ -0,0 +1,6 @@
Generate
========
:doc:`kube <man/podman-generate-kube.1>` Generate Kubernetes pod YAML from a container or pod
:doc:`systemd <man/podman-generate-systemd.1>` Generate a systemd unit file for a Podman container

View File

@ -0,0 +1,4 @@
HealthCheck
===========
:doc:`run <man/podman-healthcheck-run.1>` run the health check of a container

35
docs/source/image.rst Normal file
View File

@ -0,0 +1,35 @@
Image
=====
:doc:`build <man/podman-build.1>` Build an image using instructions from Containerfiles
:doc:`exists <man/podman-image-exists.1>` Check if an image exists in local storage
:doc:`history <man/podman-history.1>` Show history of a specified image
:doc:`import <man/podman-import.1>` Import a tarball to create a filesystem image
:doc:`inspect <man/podman-inspect.1>` Display the configuration of an image
:doc:`list <man/podman-images.1>` List images in local storage
:doc:`load <man/podman-load.1>` Load an image from container archive
:doc:`prune <man/podman-image-prune.1>` Remove unused images
:doc:`pull <man/podman-pull.1>` Pull an image from a registry
:doc:`push <man/podman-push.1>` Push an image to a specified destination
:doc:`rm <man/podman-rmi.1>` Removes one or more images from local storage
:doc:`save <man/podman-save.1>` Save image to an archive
:doc:`sign <man/podman-image-sign.1>` Sign an image
:doc:`tag <man/podman-tag.1>` Add an additional name to a local image
:doc:`tree <man/podman-image-tree.1>` Prints layer hierarchy of an image in a tree format
:doc:`trust <man/podman-image-trust.1>` Manage container image trust policy

Some files were not shown because too many files have changed in this diff Show More