"man docker" displays No manual entry for docker. OS relesse is CentOS Linux release 7.6.1810

149 views Asked by At

I install docker from a binary file which is at https://download.docker.com/linux/static/stable/x86_64/docker-20.10.0.tgz.

I execute this command in the shell:

man docker

It displays:

[root@localhost package]# man docker
No manual entry for docker
[root@localhost package]# 

How can I install docker man-documentation to my Centos system?

I tried this https://github.com/docker/cli/issues/217 but failed to execute command:

make -f docker.Makefile manpages

The command output are as follows

[root@localhost cli]# make -f docker.Makefile manpages
# build dockerfile from stdin so that we don't send the build-context; source is bind-mounted in the development environment
cat ./dockerfiles/Dockerfile.dev | docker build  --build-arg=GO_VERSION -t docker-cli-dev -
[+] Building 37.6s (12/17)                                                                                                                                                                  
 => [internal] load build definition from Dockerfile                                                                                                                                   0.1s
 => => transferring dockerfile: 1.39kB                                                                                                                                                 0.0s
 => [internal] load .dockerignore                                                                                                                                                      0.0s
 => => transferring context: 2B                                                                                                                                                        0.0s
 => resolve image config for docker.io/docker/dockerfile:1.1.7-experimental                                                                                                            8.2s
 => CACHED docker-image://docker.io/docker/dockerfile:1.1.7-experimental@sha256:de85b2f3a3e8a2f7fe48e8e84a65f6fdd5cd5183afa6412fff9caa6871649c44                                       0.0s
 => [internal] load build definition from Dockerfile                                                                                                                                   0.0s
 => => transferring dockerfile: 1.39kB                                                                                                                                                 0.0s
 => [internal] load metadata for docker.io/library/golang:1.13.15-alpine                                                                                                               3.8s
 => [internal] load build context                                                                                                                                                      0.0s
 => => transferring context: 2B                                                                                                                                                        0.0s
 => CACHED [golang 1/1] FROM docker.io/library/golang:1.13.15-alpine@sha256:e74b83b94d499cb34c7edf55fbdff9d3cfabd238a35f9cb1b59d0e74f50b1ddd                                           0.0s
 => ERROR [esc 1/1] RUN --mount=type=cache,target=/root/.cache/go-build     --mount=type=cache,target=/go/pkg/mod     --mount=type=tmpfs,target=/go/src/     GO111MODULE=on go get g  24.7s
 => ERROR [gotestsum 1/1] RUN --mount=type=cache,target=/root/.cache/go-build     --mount=type=cache,target=/go/pkg/mod     --mount=type=tmpfs,target=/go/src/     GO111MODULE=on go  25.0s
 => CANCELED [vndr 1/1] RUN --mount=type=cache,target=/root/.cache/go-build     --mount=type=cache,target=/go/pkg/mod     --mount=type=tmpfs,target=/go/src/     GO111MODULE=on go g  25.2s
 => CANCELED [dev 1/6] RUN  apk add --no-cache     bash     build-base     ca-certificates     coreutils     curl     git                                                             24.9s
------                                                                                                                                                                                      
 > [esc 1/1] RUN --mount=type=cache,target=/root/.cache/go-build     --mount=type=cache,target=/go/pkg/mod     --mount=type=tmpfs,target=/go/src/     GO111MODULE=on go get github.com/mjibson/[email protected]:                                                                                                                                                                              
#9 1.657 go: finding github.com v0.2.0                                                                                                                                                      
#9 1.657 go: finding github.com/mjibson/esc v0.2.0                                                                                                                                          
#9 1.657 go: finding github.com/mjibson v0.2.0                                                                                                                                              
#9 24.73 go get github.com/mjibson/[email protected]: github.com/mjibson/[email protected]: Get https://proxy.golang.org/github.com/mjibson/esc/@v/v0.2.0.info: dial tcp 172.217.160.81:443: connect: connection refused                                                                                                                                                                              
------                                                                                                                                                                                      
------
 > [gotestsum 1/1] RUN --mount=type=cache,target=/root/.cache/go-build     --mount=type=cache,target=/go/pkg/mod     --mount=type=tmpfs,target=/go/src/     GO111MODULE=on go get gotest.tools/[email protected]:
#13 1.790 go: finding gotest.tools v0.4.0
#13 1.790 go: finding gotest.tools/gotestsum v0.4.0
#13 24.85 go get gotest.tools/[email protected]: gotest.tools/[email protected]: Get https://proxy.golang.org/gotest.tools/gotestsum/@v/v0.4.0.info: dial tcp 172.217.160.81:443: connect: connection refused
------
error committing hzbnvm8bnbc2aaeohlt26ig3f: invalid mutable ref 0xc000faaca0: invalid: error committing ajz9dk7pkc11sno3lmyeoe6xg: invalid mutable ref 0xc00100e520: invalid: executor failed running [/bin/sh -c GO111MODULE=on go get gotest.tools/gotestsum@${GOTESTSUM_VERSION}]: exit code: 1
make: *** [build_docker_image] Error 1
[root@localhost cli]# 
1

There are 1 answers

0
paulsm4 On

GOAL: Install Docker - along with Docker man pages - on Centos 7

CHALLENGE: PC not directly connected to the Internet; need an "offline install".

RECOMMENDED SOLUTION:

https://unix.stackexchange.com/questions/259640/how-to-use-yum-to-get-all-rpms-required-for-offline-use

Here's a specific example using "httpd" as the package to download and install. This process was tested on both CentOS6 and CentOS7.

Install the stuff you need and make a place to put the downloaded RPMs:

# yum install yum-plugin-downloadonly yum-utils createrepo
# mkdir /var/tmp/httpd
# mkdir /var/tmp/httpd-installroot

Download the RPMs. This uses the installroot trick suggested here to force a full download of all dependencies since nothing is installed in that empty root. Yum will create some metadata in there, but we're going to throw it all away. Note that for CentOS7 releasever would be "7".

# yum install --downloadonly --installroot=/var/tmp/httpd-installroot --releasever=6 --downloaddir=/var/tmp/httpd httpd

Yes, that was the small version. You should have seen the size of the full-repo downloads!

Generate the metadata needed to turn our new pile of RPMs into a YUM repo and clean up the stuff we no longer need:

# createrepo --database /var/tmp/httpd
# rm -rf /var/tmp/httpd-installroot

Configure the download directory as a repo. Note that for CentOS7 the gpgkey would be named "7" instead of "6":

# vi /etc/yum.repos.d/offline-httpd.repo
[offline-httpd]
name=CentOS-$releasever - httpd
baseurl=file:///var/tmp/httpd
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

To check the missing dependencies:

# repoclosure --repoid=offline-httpd

...

Trust me - installing from a package manager ("yum" for Centos, "apt-get" for Ubuntu, etc) - is probably MUCH easier. The unix.stackexchange example above should help point you in the right direction.