0% found this document useful (0 votes)
130 views9 pages

Docker

The document describes installing Docker on a Linux system. It shows logging in as the root user, enabling additional repositories, installing prerequisite packages like container-selinux and containerd, and finally installing the docker-ce package to get Docker installed and running on the system.

Uploaded by

JWFG
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
130 views9 pages

Docker

The document describes installing Docker on a Linux system. It shows logging in as the root user, enabling additional repositories, installing prerequisite packages like container-selinux and containerd, and finally installing the docker-ce package to get Docker installed and running on the system.

Uploaded by

JWFG
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 9

login as: root

[email protected]'s password:
Last login: Mon Sep 7 15:43:51 2020 from 10.150.42.1
[root@localhost ~]# sudo yum install -y yum-utils
Loaded plugins: product-id, search-disabled-repos, subscription-manager
rhel-7-server-rpms
| 3.5 kB 00:00:00
(1/3): rhel-7-server-rpms/7Server/x86_64/group
| 631 kB 00:00:01
(2/3): rhel-7-server-rpms/7Server/x86_64/updateinfo
| 3.7 MB 00:00:01
(3/3): rhel-7-server-rpms/7Server/x86_64/primary_db
| 73 MB 00:00:51
Resolving Dependencies
--> Running transaction check
---> Package yum-utils.noarch 0:1.1.31-54.el7_8 will be installed
--> Processing Dependency: python-kitchen for package: yum-utils-1.1.31-
54.el7_8.noarch
--> Running transaction check
---> Package python-kitchen.noarch 0:1.1.1-5.el7 will be installed
--> Processing Dependency: python-chardet for package: python-kitchen-1.1.1-
5.el7.noarch
--> Running transaction check
---> Package python-chardet.noarch 0:2.2.1-3.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================
===================================================================================
=======================================================================
Package Arch
Version Repository
Size
===================================================================================
===================================================================================
=======================================================================
Installing:
yum-utils noarch
1.1.31-54.el7_8 rhel-7-server-rpms
122 k
Installing for dependencies:
python-chardet noarch
2.2.1-3.el7 rhel-7-server-rpms
227 k
python-kitchen noarch
1.1.1-5.el7 rhel-7-server-rpms
266 k

Transaction Summary
===================================================================================
===================================================================================
=======================================================================
Install 1 Package (+2 Dependent packages)

Total download size: 615 k


Installed size: 2.8 M
Downloading packages:
warning: /var/cache/yum/x86_64/7Server/rhel-7-server-rpms/packages/python-chardet-
2.2.1-3.el7.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
] 0.0 B/s | 0 B --:--:-- ETA
Public key for python-chardet-2.2.1-3.el7.noarch.rpm is not installed
(1/3): python-chardet-2.2.1-3.el7.noarch.rpm
| 227 kB 00:00:00
(2/3): python-kitchen-1.1.1-5.el7.noarch.rpm
| 266 kB 00:00:01
(3/3): yum-utils-1.1.31-54.el7_8.noarch.rpm
| 122 kB 00:00:00
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------
Total
304 kB/s | 615 kB 00:00:02
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Importing GPG key 0xFD431D51:
Userid : "Red Hat, Inc. (release key 2) <[email protected]>"
Fingerprint: 567e 347a d004 4ade 55ba 8a5f 199e 2f91 fd43 1d51
Package : redhat-release-server-7.6-4.el7.x86_64 (@anaconda/7.6)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Importing GPG key 0x2FA658E0:
Userid : "Red Hat, Inc. (auxiliary key) <[email protected]>"
Fingerprint: 43a6 e49c 4a38 f4be 9abf 2a53 4568 9c88 2fa6 58e0
Package : redhat-release-server-7.6-4.el7.x86_64 (@anaconda/7.6)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : python-chardet-2.2.1-3.el7.noarch
1/3
Installing : python-kitchen-1.1.1-5.el7.noarch
2/3
Installing : yum-utils-1.1.31-54.el7_8.noarch
3/3
rhel-7-server-rpms/7Server/x86_64/productid
| 2.1 kB 00:00:00
Verifying : python-kitchen-1.1.1-5.el7.noarch
1/3
Verifying : yum-utils-1.1.31-54.el7_8.noarch
2/3
Verifying : python-chardet-2.2.1-3.el7.noarch
3/3

Installed:
yum-utils.noarch 0:1.1.31-54.el7_8

Dependency Installed:
python-chardet.noarch 0:2.2.1-3.el7
python-kitchen.noarch 0:1.1.1-5.el7

Complete!
[root@localhost ~]# sudo yum-config-manager --add-repo
https://download.docker.com/linux/centos/docker-ce.repo
Loaded plugins: product-id, subscription-manager
adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
grabbing file https://download.docker.com/linux/centos/docker-ce.repo to
/etc/yum.repos.d/docker-ce.repo
repo saved to /etc/yum.repos.d/docker-ce.repo
[root@localhost ~]# sudo yum-config-manager --add-repo
https://download.docker.com/linux/centos/docker-ce.repo
Loaded plugins: product-id, subscription-manager
adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
grabbing file https://download.docker.com/linux/centos/docker-ce.repo to
/etc/yum.repos.d/docker-ce.repo
repo saved to /etc/yum.repos.d/docker-ce.repo
[root@localhost ~]#
[root@localhost ~]# [root@localhost ~]#
-bash: [root@localhost: command not found
[root@localhost ~]# sudo yum -y install docker-ce
Loaded plugins: product-id, search-disabled-repos, subscription-manager
docker-ce-stable
| 3.5 kB 00:00:00
(1/2): docker-ce-stable/x86_64/updateinfo
| 55 B 00:00:00
(2/2): docker-ce-stable/x86_64/primary_db
| 45 kB 00:00:00
Resolving Dependencies
--> Running transaction check
---> Package docker-ce.x86_64 3:19.03.12-3.el7 will be installed
--> Processing Dependency: container-selinux >= 2:2.74 for package: 3:docker-ce-
19.03.12-3.el7.x86_64
--> Processing Dependency: containerd.io >= 1.2.2-3 for package: 3:docker-ce-
19.03.12-3.el7.x86_64
--> Processing Dependency: docker-ce-cli for package: 3:docker-ce-19.03.12-
3.el7.x86_64
--> Processing Dependency: libcgroup for package: 3:docker-ce-19.03.12-3.el7.x86_64
--> Running transaction check
---> Package containerd.io.x86_64 0:1.2.13-3.2.el7 will be installed
--> Processing Dependency: container-selinux >= 2:2.74 for package: containerd.io-
1.2.13-3.2.el7.x86_64
---> Package docker-ce.x86_64 3:19.03.12-3.el7 will be installed
--> Processing Dependency: container-selinux >= 2:2.74 for package: 3:docker-ce-
19.03.12-3.el7.x86_64
---> Package docker-ce-cli.x86_64 1:19.03.12-3.el7 will be installed
---> Package libcgroup.x86_64 0:0.41-21.el7 will be installed
--> Finished Dependency Resolution
Error: Package: containerd.io-1.2.13-3.2.el7.x86_64 (docker-ce-stable)
Requires: container-selinux >= 2:2.74
Error: Package: 3:docker-ce-19.03.12-3.el7.x86_64 (docker-ce-stable)
Requires: container-selinux >= 2:2.74
**********************************************************************
yum can be configured to try to resolve such errors by temporarily enabling
disabled repos and searching for missing dependencies.
To enable this functionality please set 'notify_only=0' in
/etc/yum/pluginconf.d/search-disabled-repos.conf
**********************************************************************

Error: Package: containerd.io-1.2.13-3.2.el7.x86_64 (docker-ce-stable)


Requires: container-selinux >= 2:2.74
Error: Package: 3:docker-ce-19.03.12-3.el7.x86_64 (docker-ce-stable)
Requires: container-selinux >= 2:2.74
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# subscription-manager repos --enable=rhel-7-server-extras-rpms
Repository 'rhel-7-server-extras-rpms' is enabled for this system.
[root@localhost ~]# docker pull store/ibmcorp/guardium_external_s-tap:v11.2.0.137
-bash: docker: command not found
[root@localhost ~]# sudo yum -y install docker-ce
Loaded plugins: product-id, search-disabled-repos, subscription-manager
rhel-7-server-extras-rpms
| 3.4 kB 00:00:00
rhel-7-server-rpms
| 3.5 kB 00:00:00
(1/3): rhel-7-server-extras-rpms/x86_64/group
| 124 B 00:00:00
(2/3): rhel-7-server-extras-rpms/x86_64/updateinfo
| 232 kB 00:00:01
(3/3): rhel-7-server-extras-rpms/x86_64/primary_db
| 635 kB 00:00:01
Resolving Dependencies
--> Running transaction check
---> Package docker-ce.x86_64 3:19.03.12-3.el7 will be installed
--> Processing Dependency: container-selinux >= 2:2.74 for package: 3:docker-ce-
19.03.12-3.el7.x86_64
--> Processing Dependency: containerd.io >= 1.2.2-3 for package: 3:docker-ce-
19.03.12-3.el7.x86_64
--> Processing Dependency: docker-ce-cli for package: 3:docker-ce-19.03.12-
3.el7.x86_64
--> Processing Dependency: libcgroup for package: 3:docker-ce-19.03.12-3.el7.x86_64
--> Running transaction check
---> Package container-selinux.noarch 2:2.119.2-1.911c772.el7_8 will be installed
--> Processing Dependency: policycoreutils-python for package: 2:container-selinux-
2.119.2-1.911c772.el7_8.noarch
---> Package containerd.io.x86_64 0:1.2.13-3.2.el7 will be installed
---> Package docker-ce-cli.x86_64 1:19.03.12-3.el7 will be installed
---> Package libcgroup.x86_64 0:0.41-21.el7 will be installed
--> Running transaction check
---> Package policycoreutils-python.x86_64 0:2.5-34.el7 will be installed
--> Processing Dependency: policycoreutils = 2.5-34.el7 for package:
policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: audit-libs-python >= 2.1.3-4 for package:
policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libsemanage-python >= 2.5-14 for package:
policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: setools-libs >= 3.3.8-4 for package: policycoreutils-
python-2.5-34.el7.x86_64
--> Processing Dependency: checkpolicy for package: policycoreutils-python-2.5-
34.el7.x86_64
--> Processing Dependency: libapol.so.4(VERS_4.0)(64bit) for package:
policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.2)(64bit) for package:
policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.4)(64bit) for package:
policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: python-IPy for package: policycoreutils-python-2.5-
34.el7.x86_64
--> Processing Dependency: libapol.so.4()(64bit) for package: policycoreutils-
python-2.5-34.el7.x86_64
--> Processing Dependency: libqpol.so.1()(64bit) for package: policycoreutils-
python-2.5-34.el7.x86_64
--> Running transaction check
---> Package audit-libs-python.x86_64 0:2.8.5-4.el7 will be installed
--> Processing Dependency: audit-libs(x86-64) = 2.8.5-4.el7 for package: audit-
libs-python-2.8.5-4.el7.x86_64
---> Package checkpolicy.x86_64 0:2.5-8.el7 will be installed
---> Package libsemanage-python.x86_64 0:2.5-14.el7 will be installed
---> Package policycoreutils.x86_64 0:2.5-29.el7 will be updated
---> Package policycoreutils.x86_64 0:2.5-34.el7 will be an update
---> Package python-IPy.noarch 0:0.75-6.el7 will be installed
---> Package setools-libs.x86_64 0:3.3.8-4.el7 will be installed
--> Running transaction check
---> Package audit-libs.x86_64 0:2.8.4-4.el7 will be updated
--> Processing Dependency: audit-libs(x86-64) = 2.8.4-4.el7 for package: audit-
2.8.4-4.el7.x86_64
---> Package audit-libs.x86_64 0:2.8.5-4.el7 will be an update
--> Running transaction check
---> Package audit.x86_64 0:2.8.4-4.el7 will be updated
---> Package audit.x86_64 0:2.8.5-4.el7 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================
===================================================================================
=======================================================================
Package Arch
Version Repository
Size
===================================================================================
===================================================================================
=======================================================================
Installing:
docker-ce x86_64
3:19.03.12-3.el7 docker-ce-stable
24 M
Installing for dependencies:
audit-libs-python x86_64
2.8.5-4.el7 rhel-7-server-rpms
77 k
checkpolicy x86_64
2.5-8.el7 rhel-7-server-rpms
295 k
container-selinux noarch
2:2.119.2-1.911c772.el7_8 rhel-7-server-
extras-rpms 40 k
containerd.io x86_64
1.2.13-3.2.el7 docker-ce-stable
25 M
docker-ce-cli x86_64
1:19.03.12-3.el7 docker-ce-stable
38 M
libcgroup x86_64
0.41-21.el7 rhel-7-server-rpms
66 k
libsemanage-python x86_64
2.5-14.el7 rhel-7-server-rpms
113 k
policycoreutils-python x86_64
2.5-34.el7 rhel-7-server-rpms
457 k
python-IPy noarch
0.75-6.el7 rhel-7-server-rpms
32 k
setools-libs x86_64
3.3.8-4.el7 rhel-7-server-rpms
620 k
Updating for dependencies:
audit x86_64
2.8.5-4.el7 rhel-7-server-rpms
255 k
audit-libs x86_64
2.8.5-4.el7 rhel-7-server-rpms
102 k
policycoreutils x86_64
2.5-34.el7 rhel-7-server-rpms
917 k

Transaction Summary
===================================================================================
===================================================================================
=======================================================================
Install 1 Package (+10 Dependent packages)
Upgrade ( 3 Dependent packages)

Total download size: 91 M


Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/14): audit-2.8.5-4.el7.x86_64.rpm
| 255 kB 00:00:01
(2/14): audit-libs-2.8.5-4.el7.x86_64.rpm
| 102 kB 00:00:01
(3/14): audit-libs-python-2.8.5-4.el7.x86_64.rpm
| 77 kB 00:00:00
(4/14): checkpolicy-2.5-8.el7.x86_64.rpm
| 295 kB 00:00:01
(5/14): container-selinux-2.119.2-1.911c772.el7_8.noarch.rpm
| 40 kB 00:00:00
warning: /var/cache/yum/x86_64/7Server/docker-ce-stable/packages/docker-ce-
19.03.12-3.el7.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY
] 1.0 MB/s | 36 MB 00:00:52 ETA
Public key for docker-ce-19.03.12-3.el7.x86_64.rpm is not installed
(6/14): docker-ce-19.03.12-3.el7.x86_64.rpm
| 24 MB 00:00:26
(7/14): libsemanage-python-2.5-14.el7.x86_64.rpm
| 113 kB 00:00:03
(8/14): libcgroup-0.41-21.el7.x86_64.rpm
| 66 kB 00:00:07
(9/14): policycoreutils-python-2.5-34.el7.x86_64.rpm
| 457 kB 00:00:04
(10/14): python-IPy-0.75-6.el7.noarch.rpm
| 32 kB 00:00:01
(11/14): containerd.io-1.2.13-3.2.el7.x86_64.rpm
| 25 MB 00:00:43
(12/14): policycoreutils-2.5-34.el7.x86_64.rpm
| 917 kB 00:00:18
(13/14): setools-libs-3.3.8-4.el7.x86_64.rpm
| 620 kB 00:00:09
(14/14): docker-ce-cli-19.03.12-3.el7.x86_64.rpm
| 38 MB 00:00:40
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------
Total
1.3 MB/s | 91 MB 00:01:08
Retrieving key from https://download.docker.com/linux/centos/gpg
Importing GPG key 0x621E9F35:
Userid : "Docker Release (CE rpm) <[email protected]>"
Fingerprint: 060a 61c5 1b55 8a7f 742b 77aa c52f eb6b 621e 9f35
From : https://download.docker.com/linux/centos/gpg
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : audit-libs-2.8.5-4.el7.x86_64
1/17
Updating : policycoreutils-2.5-34.el7.x86_64
2/17
Installing : libcgroup-0.41-21.el7.x86_64
3/17
Installing : audit-libs-python-2.8.5-4.el7.x86_64
4/17
Installing : setools-libs-3.3.8-4.el7.x86_64
5/17
Installing : 1:docker-ce-cli-19.03.12-3.el7.x86_64
6/17
Installing : checkpolicy-2.5-8.el7.x86_64
7/17
Installing : python-IPy-0.75-6.el7.noarch
8/17
Installing : libsemanage-python-2.5-14.el7.x86_64
9/17
Installing : policycoreutils-python-2.5-34.el7.x86_64
10/17
Installing : 2:container-selinux-2.119.2-1.911c772.el7_8.noarch
11/17
Installing : containerd.io-1.2.13-3.2.el7.x86_64
12/17
Installing : 3:docker-ce-19.03.12-3.el7.x86_64
13/17
Updating : audit-2.8.5-4.el7.x86_64
14/17
Cleanup : policycoreutils-2.5-29.el7.x86_64
15/17
Cleanup : audit-2.8.4-4.el7.x86_64
16/17
Cleanup : audit-libs-2.8.4-4.el7.x86_64
17/17
rhel-7-server-extras-rpms/x86_64/productid
| 2.1 kB 00:00:00
Verifying : audit-libs-2.8.5-4.el7.x86_64
1/17
Verifying : audit-2.8.5-4.el7.x86_64
2/17
Verifying : policycoreutils-2.5-34.el7.x86_64
3/17
Verifying : libsemanage-python-2.5-14.el7.x86_64
4/17
Verifying : containerd.io-1.2.13-3.2.el7.x86_64
5/17
Verifying : 2:container-selinux-2.119.2-1.911c772.el7_8.noarch
6/17
Verifying : python-IPy-0.75-6.el7.noarch
7/17
Verifying : checkpolicy-2.5-8.el7.x86_64
8/17
Verifying : policycoreutils-python-2.5-34.el7.x86_64
9/17
Verifying : 1:docker-ce-cli-19.03.12-3.el7.x86_64
10/17
Verifying : 3:docker-ce-19.03.12-3.el7.x86_64
11/17
Verifying : setools-libs-3.3.8-4.el7.x86_64
12/17
Verifying : audit-libs-python-2.8.5-4.el7.x86_64
13/17
Verifying : libcgroup-0.41-21.el7.x86_64
14/17
Verifying : policycoreutils-2.5-29.el7.x86_64
15/17
Verifying : audit-libs-2.8.4-4.el7.x86_64
16/17
Verifying : audit-2.8.4-4.el7.x86_64
17/17

Installed:
docker-ce.x86_64 3:19.03.12-3.el7

Dependency Installed:
audit-libs-python.x86_64 0:2.8.5-4.el7 checkpolicy.x86_64 0:2.5-8.el7
container-selinux.noarch 2:2.119.2-1.911c772.el7_8 containerd.io.x86_64
0:1.2.13-3.2.el7 docker-ce-cli.x86_64 1:19.03.12-3.el7
libcgroup.x86_64 0:0.41-21.el7 libsemanage-python.x86_64 0:2.5-
14.el7 policycoreutils-python.x86_64 0:2.5-34.el7 python-
IPy.noarch 0:0.75-6.el7 setools-libs.x86_64 0:3.3.8-4.el7

Dependency Updated:
audit.x86_64 0:2.8.5-4.el7 audit-
libs.x86_64 0:2.8.5-4.el7
policycoreutils.x86_64 0:2.5-34.el7

Complete!
[root@localhost ~]# docker pull store/ibmcorp/guardium_external_s-tap:v11.2.0.137
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker
daemon running?
[root@localhost ~]# systemctl start docker
[root@localhost ~]# docker pull store/ibmcorp/guardium_external_s-tap:v11.2.0.137
Error response from daemon: pull access denied for
store/ibmcorp/guardium_external_s-tap, repository does not exist or may require
'docker login': denied: requested access to the resource is denied
[root@localhost ~]# docker login -u matrixtech
Password:
Error response from daemon: Get https://registry-1.docker.io/v2/: unauthorized:
incorrect username or password
[root@localhost ~]# docker login -u mbetancur
Password:
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded
[root@localhost ~]# docker pull store/ibmcorp/guardium_external_s-tap:v11.2.0.137
v11.2.0.137: Pulling from store/ibmcorp/guardium_external_s-tap
23302e52b49d: Pull complete
cf5693de4d3c: Pull complete
1a861b7c86b2: Pull complete
706b3d390eef: Pull complete
e837fd69a38f: Pull complete
0c33c97edba9: Pull complete
Digest: sha256:e7830499e41927483d7ded188517d3852d701df32f7b07dc92acbaa61d8c0370
Status: Downloaded newer image for store/ibmcorp/guardium_external_s-
tap:v11.2.0.137
docker.io/store/ibmcorp/guardium_external_s-tap:v11.2.0.137
[root@localhost ~]#

You might also like