Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Install Docker man pages for your Docker version
# make bash behave
set -euo pipefail
# adapted from:
# create tmpdir and register cleanup callback
tmpdir=$(mktemp -d ~/.docker-man.XXXXXXXX)
cd "${tmpdir}"
function cleanup {
docker-clean -c
rm -rf "${tmpdir}"
trap cleanup EXIT
# ensure we're getting the right doc version
dockerversion=$(docker version -f '{{ .Client.Version }}')
git clone --quiet --branch "v${dockerversion}" --depth 1 \
cd docker
make manpages
cd man
cp -R man* /usr/local/share/man/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.