Installation of Docker on RHEL 7 using RPMs from extra repository

News

Azure

Recommended Links

Installation of Docker on RHEL 7 using RPMs from extra repository

dockerroot group problem

Running Docker from a regular user account

Download Docker images without the pull command when you are behind proxy

VMware Xen   Virtual PC Suse on Virtual PC Conversion of harddrive partitions Virtual Software Appliances
Solaris Zones Solaris Ldoms   BSD Jails VM/CMS

 Humor

Etc

See also How to install Docker on Red Hat Enterprise Linux 7

Step 1: Enable Red Hat Extra repositories

yum repolist all
yum-config-manager --enable rhel-7-server-extras-rpms

[email protected]:/root # yum-config-manager --enable rhel-7-server-extras-rpms
Loaded plugins: langpacks, product-id, subscription-manager
===================================================================================== repo: rhel-7-server-extras-rpms ======================================================================================
[rhel-7-server-extras-rpms]
async = True
bandwidth = 0
base_persistdir = /var/lib/yum/repos/x86_64/7Server
baseurl = https://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/extras/os
cache = 0
cachedir = /var/cache/yum/x86_64/7Server/rhel-7-server-extras-rpms
check_config_file_age = True
compare_providers_priority = 80
cost = 1000
deltarpm_metadata_percentage = 100
deltarpm_percentage =
enabled = 1
enablegroups = True
exclude =
failovermethod = priority
ftp_disable_epsv = False
gpgcadir = /var/lib/yum/repos/x86_64/7Server/rhel-7-server-extras-rpms/gpgcadir
gpgcakey =
gpgcheck = True
gpgdir = /var/lib/yum/repos/x86_64/7Server/rhel-7-server-extras-rpms/gpgdir
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
hdrdir = /var/cache/yum/x86_64/7Server/rhel-7-server-extras-rpms/headers
http_caching = all
includepkgs =
ip_resolve =
keepalive = True
keepcache = False
mddownloadpolicy = sqlite
mdpolicy = group:small
mediaid =
metadata_expire = 86400
metadata_expire_filter = read-only:present
metalink =
minrate = 0
mirrorlist =
mirrorlist_expire = 86400
name = Red Hat Enterprise Linux 7 Server - Extras (RPMs)
old_base_cache_dir =
password =
persistdir = /var/lib/yum/repos/x86_64/7Server/rhel-7-server-extras-rpms
pkgdir = /var/cache/yum/x86_64/7Server/rhel-7-server-extras-rpms/packages
proxy = False
proxy_dict =
proxy_password =
proxy_username =
repo_gpgcheck = False
retries = 10
skip_if_unavailable = False
ssl_check_cert_permissions = True
sslcacert = /etc/rhsm/ca/redhat-uep.pem
sslclientcert = /etc/pki/entitlement/7916798577842921154.pem
sslclientkey = /etc/pki/entitlement/7916798577842921154-key.pem
sslverify = True
throttle = 0
timeout = 30.0
ui_id = rhel-7-server-extras-rpms/x86_64
ui_repoid_vars = basearch
username =

Step2: Check if it was enabled

yum repolist

[email protected]:/root # yum repolist
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
rhel-7-server-extras-rpms | 3.5 kB 00:00:00
rhel-7-server-rpms | 3.5 kB 00:00:00
(1/5): rhel-7-server-extras-rpms/x86_64/group | 104 B 00:00:01
(2/5): rhel-7-server-extras-rpms/x86_64/updateinfo | 304 kB 00:00:02
(3/5): rhel-7-server-extras-rpms/x86_64/primary_db | 481 kB 00:00:07
(4/5): rhel-7-server-rpms/7Server/x86_64/updateinfo | 3.1 MB 00:00:28
(5/5): rhel-7-server-rpms/7Server/x86_64/primary_db | 53 MB 00:02:48
repo id repo name status
rhel-7-server-extras-rpms/x86_64 Red Hat Enterprise Linux 7 Server - Extras (RPMs) 1,019
rhel-7-server-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 Server (RPMs) 23,382
repolist: 24,401

Step 3: Install Docket from RPMs

yum search docker
yum install docker

[email protected]:/root # yum install docker
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
Resolving Dependencies
--> Running transaction check
---> Package docker.x86_64 2:1.13.1-88.git07f3374.el7 will be installed
--> Processing Dependency: docker-client = 2:1.13.1-88.git07f3374.el7 for package: 2:docker-1.13.1-88.git07f3374.el7.x86_64
--> Processing Dependency: docker-common = 2:1.13.1-88.git07f3374.el7 for package: 2:docker-1.13.1-88.git07f3374.el7.x86_64
--> Running transaction check
---> Package docker-client.x86_64 2:1.13.1-88.git07f3374.el7 will be installed
---> Package docker-common.x86_64 2:1.13.1-88.git07f3374.el7 will be installed
--> Processing Dependency: docker-rhel-push-plugin = 2:1.13.1-88.git07f3374.el7 for package: 2:docker-common-1.13.1-88.git07f3374.el7.x86_64
--> Processing Dependency: container-selinux >= 2:2.51-1 for package: 2:docker-common-1.13.1-88.git07f3374.el7.x86_64
--> Processing Dependency: container-storage-setup >= 0.9.0-1 for package: 2:docker-common-1.13.1-88.git07f3374.el7.x86_64
--> Processing Dependency: oci-register-machine >= 1:0-5.13 for package: 2:docker-common-1.13.1-88.git07f3374.el7.x86_64
--> Processing Dependency: oci-systemd-hook >= 1:0.1.4-9 for package: 2:docker-common-1.13.1-88.git07f3374.el7.x86_64
--> Processing Dependency: oci-umount >= 2:2.3.3-3 for package: 2:docker-common-1.13.1-88.git07f3374.el7.x86_64
--> Processing Dependency: skopeo-containers >= 1:0.1.26-2 for package: 2:docker-common-1.13.1-88.git07f3374.el7.x86_64
--> Processing Dependency: atomic-registries for package: 2:docker-common-1.13.1-88.git07f3374.el7.x86_64
--> Running transaction check
---> Package atomic-registries.x86_64 1:1.22.1-26.gitb507039.el7 will be installed
--> Processing Dependency: python-pytoml for package: 1:atomic-registries-1.22.1-26.gitb507039.el7.x86_64
---> Package container-selinux.noarch 2:2.74-1.el7 will be installed
--> Processing Dependency: selinux-policy >= 3.13.1-216.el7 for package: 2:container-selinux-2.74-1.el7.noarch
--> Processing Dependency: selinux-policy-base >= 3.13.1-216.el7 for package: 2:container-selinux-2.74-1.el7.noarch
--> Processing Dependency: selinux-policy-targeted >= 3.13.1-216.el7 for package: 2:container-selinux-2.74-1.el7.noarch
---> Package container-storage-setup.noarch 0:0.11.0-2.git5eaf76c.el7 will be installed
---> Package containers-common.x86_64 1:0.1.31-7.gitb0b750d.el7 will be installed
---> Package docker-rhel-push-plugin.x86_64 2:1.13.1-88.git07f3374.el7 will be installed
---> Package oci-register-machine.x86_64 1:0-6.git2b44233.el7 will be installed
---> Package oci-systemd-hook.x86_64 1:0.1.18-2.git3efe246.el7 will be installed
---> Package oci-umount.x86_64 2:2.3.4-2.git87f9237.el7 will be installed
--> Running transaction check
---> Package python-pytoml.noarch 0:0.1.14-1.git7dea353.el7 will be installed
---> Package selinux-policy.noarch 0:3.13.1-192.el7_5.6 will be updated
---> Package selinux-policy.noarch 0:3.13.1-229.el7_6.6 will be an update
--> Processing Dependency: libsemanage >= 2.5-13 for package: selinux-policy-3.13.1-229.el7_6.6.noarch
--> Processing Dependency: policycoreutils >= 2.5-24 for package: selinux-policy-3.13.1-229.el7_6.6.noarch
---> Package selinux-policy-targeted.noarch 0:3.13.1-192.el7_5.6 will be updated
---> Package selinux-policy-targeted.noarch 0:3.13.1-229.el7_6.6 will be an update
--> Running transaction check
---> Package libsemanage.x86_64 0:2.5-11.el7 will be updated
--> Processing Dependency: libsemanage = 2.5-11.el7 for package: libsemanage-python-2.5-11.el7.x86_64
---> Package libsemanage.x86_64 0:2.5-14.el7 will be an update
--> Processing Dependency: libselinux >= 2.5-14 for package: libsemanage-2.5-14.el7.x86_64
--> Processing Dependency: libsepol >= 2.5-10 for package: libsemanage-2.5-14.el7.x86_64
---> Package policycoreutils.x86_64 0:2.5-22.el7 will be updated
--> Processing Dependency: policycoreutils = 2.5-22.el7 for package: policycoreutils-python-2.5-22.el7.x86_64
---> Package policycoreutils.x86_64 0:2.5-29.el7 will be an update
--> Processing Dependency: libselinux-utils >= 2.5-14 for package: policycoreutils-2.5-29.el7.x86_64
--> Running transaction check
---> Package libselinux.i686 0:2.5-12.el7 will be updated
---> Package libselinux.x86_64 0:2.5-12.el7 will be updated
--> Processing Dependency: libselinux(x86-64) = 2.5-12.el7 for package: libselinux-python-2.5-12.el7.x86_64
---> Package libselinux.i686 0:2.5-14.1.el7 will be an update
---> Package libselinux.x86_64 0:2.5-14.1.el7 will be an update
---> Package libselinux-utils.x86_64 0:2.5-12.el7 will be updated
---> Package libselinux-utils.x86_64 0:2.5-14.1.el7 will be an update
---> Package libsemanage-python.x86_64 0:2.5-11.el7 will be updated
---> Package libsemanage-python.x86_64 0:2.5-14.el7 will be an update
---> Package libsepol.i686 0:2.5-8.1.el7 will be updated
---> Package libsepol.x86_64 0:2.5-8.1.el7 will be updated
---> Package libsepol.i686 0:2.5-10.el7 will be an update
---> Package libsepol.x86_64 0:2.5-10.el7 will be an update
---> Package policycoreutils-python.x86_64 0:2.5-22.el7 will be updated
---> Package policycoreutils-python.x86_64 0:2.5-29.el7 will be an update
--> Processing Dependency: setools-libs >= 3.3.8-4 for package: policycoreutils-python-2.5-29.el7.x86_64
--> Running transaction check
---> Package libselinux-python.x86_64 0:2.5-12.el7 will be updated
---> Package libselinux-python.x86_64 0:2.5-14.1.el7 will be an update
---> Package setools-libs.x86_64 0:3.3.8-2.el7 will be updated
---> Package setools-libs.x86_64 0:3.3.8-4.el7 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================================================================================
Package Arch Version Repository Size
============================================================================================================================================================================================================
Installing:
docker x86_64 2:1.13.1-88.git07f3374.el7 rhel-7-server-extras-rpms 17 M
Installing for dependencies:
atomic-registries x86_64 1:1.22.1-26.gitb507039.el7 rhel-7-server-extras-rpms 35 k
container-selinux noarch 2:2.74-1.el7 rhel-7-server-extras-rpms 37 k
container-storage-setup noarch 0.11.0-2.git5eaf76c.el7 rhel-7-server-extras-rpms 35 k
containers-common x86_64 1:0.1.31-7.gitb0b750d.el7 rhel-7-server-extras-rpms 18 k
docker-client x86_64 2:1.13.1-88.git07f3374.el7 rhel-7-server-extras-rpms 3.8 M
docker-common x86_64 2:1.13.1-88.git07f3374.el7 rhel-7-server-extras-rpms 95 k
docker-rhel-push-plugin x86_64 2:1.13.1-88.git07f3374.el7 rhel-7-server-extras-rpms 1.9 M
oci-register-machine x86_64 1:0-6.git2b44233.el7 rhel-7-server-extras-rpms 1.1 M
oci-systemd-hook x86_64 1:0.1.18-2.git3efe246.el7 rhel-7-server-extras-rpms 34 k
oci-umount x86_64 2:2.3.4-2.git87f9237.el7 rhel-7-server-extras-rpms 32 k
python-pytoml noarch 0.1.14-1.git7dea353.el7 rhel-7-server-extras-rpms 18 k
Updating for dependencies:
libselinux i686 2.5-14.1.el7 rhel-7-server-rpms 166 k
libselinux x86_64 2.5-14.1.el7 rhel-7-server-rpms 162 k
libselinux-python x86_64 2.5-14.1.el7 rhel-7-server-rpms 236 k
libselinux-utils x86_64 2.5-14.1.el7 rhel-7-server-rpms 152 k
libsemanage x86_64 2.5-14.el7 rhel-7-server-rpms 151 k
libsemanage-python x86_64 2.5-14.el7 rhel-7-server-rpms 113 k
libsepol i686 2.5-10.el7 rhel-7-server-rpms 294 k
libsepol x86_64 2.5-10.el7 rhel-7-server-rpms 297 k
policycoreutils x86_64 2.5-29.el7 rhel-7-server-rpms 916 k
policycoreutils-python x86_64 2.5-29.el7 rhel-7-server-rpms 456 k
selinux-policy noarch 3.13.1-229.el7_6.6 rhel-7-server-rpms 483 k
selinux-policy-targeted noarch 3.13.1-229.el7_6.6 rhel-7-server-rpms 6.9 M
setools-libs x86_64 3.3.8-4.el7 rhel-7-server-rpms 620 k

Transaction Summary
============================================================================================================================================================================================================
Install 1 Package (+11 Dependent packages)
Upgrade ( 13 Dependent packages)

Total download size: 35 M
Is this ok [y/d/N]: y
Downloading packages:
No Presto metadata available for rhel-7-server-rpms
(1/25): atomic-registries-1.22.1-26.gitb507039.el7.x86_64.rpm | 35 kB 00:00:00
(2/25): container-selinux-2.74-1.el7.noarch.rpm | 37 kB 00:00:00
(3/25): containers-common-0.1.31-7.gitb0b750d.el7.x86_64.rpm | 18 kB 00:00:00
(4/25): container-storage-setup-0.11.0-2.git5eaf76c.el7.noarch.rpm | 35 kB 00:00:00
(5/25): docker-client-1.13.1-88.git07f3374.el7.x86_64.rpm | 3.8 MB 00:00:10
(6/25): docker-common-1.13.1-88.git07f3374.el7.x86_64.rpm | 95 kB 00:00:01
(7/25): libselinux-2.5-14.1.el7.x86_64.rpm | 162 kB 00:00:02
(8/25): libselinux-2.5-14.1.el7.i686.rpm | 166 kB 00:00:02
(9/25): libselinux-utils-2.5-14.1.el7.x86_64.rpm | 152 kB 00:00:02
(10/25): libselinux-python-2.5-14.1.el7.x86_64.rpm | 236 kB 00:00:02
(11/25): libsemanage-2.5-14.el7.x86_64.rpm | 151 kB 00:00:02
(12/25): libsemanage-python-2.5-14.el7.x86_64.rpm | 113 kB 00:00:01
(13/25): docker-rhel-push-plugin-1.13.1-88.git07f3374.el7.x86_64.rpm | 1.9 MB 00:00:09
(14/25): libsepol-2.5-10.el7.i686.rpm | 294 kB 00:00:03
(15/25): libsepol-2.5-10.el7.x86_64.rpm | 297 kB 00:00:03
(16/25): oci-register-machine-0-6.git2b44233.el7.x86_64.rpm | 1.1 MB 00:00:06
(17/25): oci-systemd-hook-0.1.18-2.git3efe246.el7.x86_64.rpm | 34 kB 00:00:00
(18/25): oci-umount-2.3.4-2.git87f9237.el7.x86_64.rpm | 32 kB 00:00:00
(19/25): python-pytoml-0.1.14-1.git7dea353.el7.noarch.rpm | 18 kB 00:00:00
(20/25): policycoreutils-python-2.5-29.el7.x86_64.rpm | 456 kB 00:00:04
(21/25): policycoreutils-2.5-29.el7.x86_64.rpm | 916 kB 00:00:05
(22/25): selinux-policy-3.13.1-229.el7_6.6.noarch.rpm | 483 kB 00:00:03
(23/25): setools-libs-3.3.8-4.el7.x86_64.rpm | 620 kB 00:00:04
(24/25): selinux-policy-targeted-3.13.1-229.el7_6.6.noarch.rpm | 6.9 MB 00:00:18
(25/25): docker-1.13.1-88.git07f3374.el7.x86_64.rpm | 17 MB 00:01:00
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 584 kB/s | 35 MB 00:01:02
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : libsepol-2.5-10.el7.x86_64 1/38
Updating : libselinux-2.5-14.1.el7.x86_64 2/38
Updating : libsemanage-2.5-14.el7.x86_64 3/38
Updating : libselinux-utils-2.5-14.1.el7.x86_64 4/38
Updating : policycoreutils-2.5-29.el7.x86_64 5/38
Updating : selinux-policy-3.13.1-229.el7_6.6.noarch 6/38
Updating : selinux-policy-targeted-3.13.1-229.el7_6.6.noarch 7/38
Updating : libsemanage-python-2.5-14.el7.x86_64 8/38
Installing : 1:oci-systemd-hook-0.1.18-2.git3efe246.el7.x86_64 9/38
Updating : setools-libs-3.3.8-4.el7.x86_64 10/38
Updating : libselinux-python-2.5-14.1.el7.x86_64 11/38
Updating : policycoreutils-python-2.5-29.el7.x86_64 12/38
Installing : 2:container-selinux-2.74-1.el7.noarch 13/38
setsebool: SELinux is disabled.
sed: can't read /etc/selinux/minimum/contexts/customizable_types: No such file or directory
Installing : 1:containers-common-0.1.31-7.gitb0b750d.el7.x86_64 14/38
Installing : 1:oci-register-machine-0-6.git2b44233.el7.x86_64 15/38
Installing : python-pytoml-0.1.14-1.git7dea353.el7.noarch 16/38
Installing : 1:atomic-registries-1.22.1-26.gitb507039.el7.x86_64 17/38
Installing : 2:oci-umount-2.3.4-2.git87f9237.el7.x86_64 18/38
Installing : container-storage-setup-0.11.0-2.git5eaf76c.el7.noarch 19/38
Installing : 2:docker-rhel-push-plugin-1.13.1-88.git07f3374.el7.x86_64 20/38
Installing : 2:docker-common-1.13.1-88.git07f3374.el7.x86_64 21/38
Installing : 2:docker-client-1.13.1-88.git07f3374.el7.x86_64 22/38
Updating : libsepol-2.5-10.el7.i686 23/38
Installing : 2:docker-1.13.1-88.git07f3374.el7.x86_64 24/38
Updating : libselinux-2.5-14.1.el7.i686 25/38
Cleanup : policycoreutils-python-2.5-22.el7.x86_64 26/38
Cleanup : selinux-policy-targeted-3.13.1-192.el7_5.6.noarch 27/38
Cleanup : selinux-policy-3.13.1-192.el7_5.6.noarch 28/38
Cleanup : libselinux-2.5-12.el7 29/38
Cleanup : policycoreutils-2.5-22.el7.x86_64 30/38
Cleanup : libselinux-utils-2.5-12.el7.x86_64 31/38
Cleanup : setools-libs-3.3.8-2.el7.x86_64 32/38
Cleanup : libselinux-python-2.5-12.el7.x86_64 33/38
Cleanup : libsemanage-python-2.5-11.el7.x86_64 34/38
Cleanup : libsepol-2.5-8.1.el7 35/38
Cleanup : libsemanage-2.5-11.el7.x86_64 36/38
Cleanup : libselinux-2.5-12.el7 37/38
Cleanup : libsepol-2.5-8.1.el7 38/38
rhel-7-server-extras-rpms/x86_64/productid | 2.1 kB 00:00:00
rhel-7-server-rpms/7Server/x86_64/productid | 2.1 kB 00:00:00
Verifying : selinux-policy-3.13.1-229.el7_6.6.noarch 1/38
Verifying : 2:docker-rhel-push-plugin-1.13.1-88.git07f3374.el7.x86_64 2/38
Verifying : libsepol-2.5-10.el7.i686 3/38
Verifying : policycoreutils-python-2.5-29.el7.x86_64 4/38
Verifying : container-storage-setup-0.11.0-2.git5eaf76c.el7.noarch 5/38
Verifying : policycoreutils-2.5-29.el7.x86_64 6/38
Verifying : 2:container-selinux-2.74-1.el7.noarch 7/38
Verifying : libselinux-2.5-14.1.el7.i686 8/38
Verifying : 2:oci-umount-2.3.4-2.git87f9237.el7.x86_64 9/38
Verifying : 1:oci-systemd-hook-0.1.18-2.git3efe246.el7.x86_64 10/38
Verifying : python-pytoml-0.1.14-1.git7dea353.el7.noarch 11/38
Verifying : setools-libs-3.3.8-4.el7.x86_64 12/38
Verifying : 2:docker-1.13.1-88.git07f3374.el7.x86_64 13/38
Verifying : 2:docker-common-1.13.1-88.git07f3374.el7.x86_64 14/38
Verifying : libsemanage-python-2.5-14.el7.x86_64 15/38
Verifying : libsemanage-2.5-14.el7.x86_64 16/38
Verifying : 1:oci-register-machine-0-6.git2b44233.el7.x86_64 17/38
Verifying : libsepol-2.5-10.el7.x86_64 18/38
Verifying : libselinux-python-2.5-14.1.el7.x86_64 19/38
Verifying : selinux-policy-targeted-3.13.1-229.el7_6.6.noarch 20/38
Verifying : libselinux-utils-2.5-14.1.el7.x86_64 21/38
Verifying : 2:docker-client-1.13.1-88.git07f3374.el7.x86_64 22/38
Verifying : 1:containers-common-0.1.31-7.gitb0b750d.el7.x86_64 23/38
Verifying : libselinux-2.5-14.1.el7.x86_64 24/38
Verifying : 1:atomic-registries-1.22.1-26.gitb507039.el7.x86_64 25/38
Verifying : libsemanage-python-2.5-11.el7.x86_64 26/38
Verifying : libselinux-python-2.5-12.el7.x86_64 27/38
Verifying : setools-libs-3.3.8-2.el7.x86_64 28/38
Verifying : libsepol-2.5-8.1.el7.i686 29/38
Verifying : policycoreutils-2.5-22.el7.x86_64 30/38
Verifying : libsemanage-2.5-11.el7.x86_64 31/38
Verifying : policycoreutils-python-2.5-22.el7.x86_64 32/38
Verifying : selinux-policy-targeted-3.13.1-192.el7_5.6.noarch 33/38
Verifying : libselinux-2.5-12.el7.i686 34/38
Verifying : libsepol-2.5-8.1.el7.x86_64 35/38
Verifying : libselinux-2.5-12.el7.x86_64 36/38
Verifying : libselinux-utils-2.5-12.el7.x86_64 37/38
Verifying : selinux-policy-3.13.1-192.el7_5.6.noarch 38/38

Installed:
docker.x86_64 2:1.13.1-88.git07f3374.el7

Dependency Installed:
atomic-registries.x86_64 1:1.22.1-26.gitb507039.el7 container-selinux.noarch 2:2.74-1.el7 container-storage-setup.noarch 0:0.11.0-2.git5eaf76c.el7
containers-common.x86_64 1:0.1.31-7.gitb0b750d.el7 docker-client.x86_64 2:1.13.1-88.git07f3374.el7 docker-common.x86_64 2:1.13.1-88.git07f3374.el7
docker-rhel-push-plugin.x86_64 2:1.13.1-88.git07f3374.el7 oci-register-machine.x86_64 1:0-6.git2b44233.el7 oci-systemd-hook.x86_64 1:0.1.18-2.git3efe246.el7
oci-umount.x86_64 2:2.3.4-2.git87f9237.el7 python-pytoml.noarch 0:0.1.14-1.git7dea353.el7

Dependency Updated:
libselinux.i686 0:2.5-14.1.el7 libselinux.x86_64 0:2.5-14.1.el7 libselinux-python.x86_64 0:2.5-14.1.el7 libselinux-utils.x86_64 0:2.5-14.1.el7
libsemanage.x86_64 0:2.5-14.el7 libsemanage-python.x86_64 0:2.5-14.el7 libsepol.i686 0:2.5-10.el7 libsepol.x86_64 0:2.5-10.el7
policycoreutils.x86_64 0:2.5-29.el7 policycoreutils-python.x86_64 0:2.5-29.el7 selinux-policy.noarch 0:3.13.1-229.el7_6.6 selinux-policy-targeted.noarch 0:3.13.1-229.el7_6.6

Step 4: add users to dockeroot group. Initially it is easier to do via vi

 usermod -G dockerroot hussaif1
dockerroot:x:979:bezroun,hussaif1,sanchers,jablonke,wangs90,saklotks

Change ownership of the docker daemon socket

Edit (or create) /etc/docker/daemon.json

1

2

3

4

{

    "live-restore": true,

    "group": "dockerroot"

}

And then restart the docker daemon

1

systemctl restart docker

 

Step 5 enable docler.service

[email protected]:/root # systemctl start docker.service
[email protected]:/root # systemctl enable docker.service

Step 5: Setup PROXY

Restart docker after modification proxy variables via /etc/sysconfig/docker file
HTTP_PROXY=http://USERNAME:[email protected]:8080/
HTTPS_PROXY=https://USERNAME:[email protected]:8080/
NO_PROXY= hostname.example.com,172.30.123.45
  • Without authentication
HTTP_PROXY=http://10.0.1.1:8080/
HTTPS_PROXY=10.0.0.1:8080/
NO_PROXY= hostname.example.com,172.30.123.45

 

 

Enable and start docker-distribution.service

systemctl enable docker-distribution.service
Created symlink from /etc/systemd/system/multi-user.target.wants/docker-distribution.service to /usr/lib/systemd/system/docker-distribution.service.
systemctl start docker-distribution.service

Test the registry

[email protected]:/root # docker pull registry.access.redhat.com/rhel

access.redhat.com

As of RHEL 7.3.5, the registry.access.redhat.com/rhel7-init container image is available, and it is pre-configured to run systemd properly.
 

Environment

  • Red Hat Enterprise Linux 7

Issue

  • I would like to setup and install a docker registry, can this be done?

Resolution

  1. Install the Docker Registry
    Raw
    # yum install docker-distribution
    
  2. Start the Docker Registry Service
    Raw
    # systemctl start docker-distribution.service
    
    • You may want to have this start by default on boot, if so make sure you enable the service on.
    Raw
    # systemctl enable docker-distribution.service
    

Interacting and using your private registry

Getting an image from a registry

  1. Pull an image from the Public Repository or use registry.access.redhat.com to get images directly from Red Hat.
    Raw
    docker pull registry.access.redhat.com/rhel
    
    • You can also pull from your private registry (after images have been uploaded by specifying the registry location at the end of the pull command):
    Raw
    docker pull myregistry.example.com:5000/rhel7
    
  2. Then, find the image id that corresponds to the fedora repository, and pull the latest tag'ed image.
    Raw
    docker images | grep rhel | grep latest
    registry.access.redhat.com/rhel                   latest              db7a70a0414e        3 hours ago         195.9 MB
    

Pushing an Image to a registry

  1. Create a tag for this image and point it at your private registry
    Raw
    docker tag db7a70a0414e myregistry.example.com:5000/rhel7
    
  2. Push the image to the new registry to store it in its new home location.
    Raw
    docker push myregistry.example.com:5000/rhel7
    

This solution is part of Red Hat's fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Listing images in a private docker registry

Diagnoiswtics

Diagnostic Steps

From the output of the docker pull that gave the forbidden error below, you can attempt to access the data the GET operation is running against using the curl command.

Raw
# docker --log-level=debug pull registry.access.redhat.com/openshift3/metrics-hawkular-metrics:3.5.0 | tee dockerpull.out
Trying to pull repository registry.access.redhat.com/openshift3/metrics-hawkular-metrics ...
Get https://registry.redhat.io/containers/content/dist/rhel/server/7/7Server/x86_64/ose/3/containers/registry/openshift3/metrics-hawkular-metrics/manifests/3.5.0: Forbidden

# curl -vv https://registry.redhat.io/containers/content/dist/rhel/server/7/7Server/x86_64/ose/3/containers/registry/openshift3/metrics-hawkular-metrics/manifests/3.5.0


Top Visited
Switchboard
Latest
Past week
Past month

NEWS CONTENTS

Old News ;-)

[Jan 27, 2019] If you are using the Docker package supplied by Red Hat / CentOS, the dockerroot group is automatically added to the system. You will need to edit (or create) /etc/docker/daemon.json to include the following: group : dockerroot

Highly recommended!
Jan 27, 2019 | rancher.com

If you are using the Docker Docker package supplied by Red Hat / CentOS, the package name is docker . You can check the installed package by executing:

rpm -q docker

If you are using the Docker package supplied by Red Hat / CentOS, the dockerroot group is automatically added to the system. You will need to edit (or create) /etc/docker/daemon.json to include the following:

{
    "group": "dockerroot"
}

Restart Docker after editing or creating the file. After restarting Docker, you can check the group permission of the Docker socket ( /var/run/docker.sock ), which should show dockerroot as group:

srw-rw----. 1 root dockerroot 0 Jul  4 09:57 /var/run/docker.sock

Add the SSH user you want to use to this group, this can't be the root user.

usermod -aG dockerroot <user_name>

To verify that the user is correctly configured, log out of the node and login with your SSH user, and execute docker ps :

ssh <user_name>@node
$ docker ps
CONTAINER

[Jan 26, 2019] You need to add user to dockerroot group and create daemon.json file to be able to use docker from a regular user account after Docker installation from Red Hat executables by Aslan Brooke

Highly recommended!
It is better to stop docker and start it after change of daemon.json. Restart does not always work as intended and socket can remain owned incorrectly.
Oct 15, 2018 | blog.aslanbrooke.com

Originally from Run Docker Without Sudo – Aslan Brooke's Blog

Update the /etc/docker/daemon.json as follow (will require root priveleges):
{
"live-restore": true,
"group": "dockerroot"
}

Add user (replace ) to "dockerroot" group using the below command and then restart the docker service.

usermod -aG dockerroot <user name> 
restart docker service

Recommended Links

Google matched content

Softpanorama Recommended

Top articles

[Jan 27, 2019] If you are using the Docker package supplied by Red Hat / CentOS, the dockerroot group is automatically added to the system. You will need to edit (or create) /etc/docker/daemon.json to include the following: group : dockerroot Published on Jan 27, 2019 | rancher.com

[Jan 26, 2019] You need to add user to dockerroot group and create daemon.json file to be able to use docker from a regular user account after Docker installation from Red Hat executables by Aslan Brooke Published on Oct 15, 2018 | blog.aslanbrooke.com

Sites

Red Hat Enterprise Linux Atomic Host 7 Getting Started with Containers - Red Hat Customer Portal

Post-installation steps for Linux Docker Documentation



Etc

Society

Groupthink : Two Party System as Polyarchy : Corruption of Regulators : Bureaucracies : Understanding Micromanagers and Control Freaks : Toxic Managers :   Harvard Mafia : Diplomatic Communication : Surviving a Bad Performance Review : Insufficient Retirement Funds as Immanent Problem of Neoliberal Regime : PseudoScience : Who Rules America : Neoliberalism  : The Iron Law of Oligarchy : Libertarian Philosophy

Quotes

War and Peace : Skeptical Finance : John Kenneth Galbraith :Talleyrand : Oscar Wilde : Otto Von Bismarck : Keynes : George Carlin : Skeptics : Propaganda  : SE quotes : Language Design and Programming Quotes : Random IT-related quotesSomerset Maugham : Marcus Aurelius : Kurt Vonnegut : Eric Hoffer : Winston Churchill : Napoleon Bonaparte : Ambrose BierceBernard Shaw : Mark Twain Quotes

Bulletin:

Vol 25, No.12 (December, 2013) Rational Fools vs. Efficient Crooks The efficient markets hypothesis : Political Skeptic Bulletin, 2013 : Unemployment Bulletin, 2010 :  Vol 23, No.10 (October, 2011) An observation about corporate security departments : Slightly Skeptical Euromaydan Chronicles, June 2014 : Greenspan legacy bulletin, 2008 : Vol 25, No.10 (October, 2013) Cryptolocker Trojan (Win32/Crilock.A) : Vol 25, No.08 (August, 2013) Cloud providers as intelligence collection hubs : Financial Humor Bulletin, 2010 : Inequality Bulletin, 2009 : Financial Humor Bulletin, 2008 : Copyleft Problems Bulletin, 2004 : Financial Humor Bulletin, 2011 : Energy Bulletin, 2010 : Malware Protection Bulletin, 2010 : Vol 26, No.1 (January, 2013) Object-Oriented Cult : Political Skeptic Bulletin, 2011 : Vol 23, No.11 (November, 2011) Softpanorama classification of sysadmin horror stories : Vol 25, No.05 (May, 2013) Corporate bullshit as a communication method  : Vol 25, No.06 (June, 2013) A Note on the Relationship of Brooks Law and Conway Law

History:

Fifty glorious years (1950-2000): the triumph of the US computer engineering : Donald Knuth : TAoCP and its Influence of Computer Science : Richard Stallman : Linus Torvalds  : Larry Wall  : John K. Ousterhout : CTSS : Multix OS Unix History : Unix shell history : VI editor : History of pipes concept : Solaris : MS DOSProgramming Languages History : PL/1 : Simula 67 : C : History of GCC developmentScripting Languages : Perl history   : OS History : Mail : DNS : SSH : CPU Instruction Sets : SPARC systems 1987-2006 : Norton Commander : Norton Utilities : Norton Ghost : Frontpage history : Malware Defense History : GNU Screen : OSS early history

Classic books:

The Peter Principle : Parkinson Law : 1984 : The Mythical Man-MonthHow to Solve It by George Polya : The Art of Computer Programming : The Elements of Programming Style : The Unix Hater’s Handbook : The Jargon file : The True Believer : Programming Pearls : The Good Soldier Svejk : The Power Elite

Most popular humor pages:

Manifest of the Softpanorama IT Slacker Society : Ten Commandments of the IT Slackers Society : Computer Humor Collection : BSD Logo Story : The Cuckoo's Egg : IT Slang : C++ Humor : ARE YOU A BBS ADDICT? : The Perl Purity Test : Object oriented programmers of all nations : Financial Humor : Financial Humor Bulletin, 2008 : Financial Humor Bulletin, 2010 : The Most Comprehensive Collection of Editor-related Humor : Programming Language Humor : Goldman Sachs related humor : Greenspan humor : C Humor : Scripting Humor : Real Programmers Humor : Web Humor : GPL-related Humor : OFM Humor : Politically Incorrect Humor : IDS Humor : "Linux Sucks" Humor : Russian Musical Humor : Best Russian Programmer Humor : Microsoft plans to buy Catholic Church : Richard Stallman Related Humor : Admin Humor : Perl-related Humor : Linus Torvalds Related humor : PseudoScience Related Humor : Networking Humor : Shell Humor : Financial Humor Bulletin, 2011 : Financial Humor Bulletin, 2012 : Financial Humor Bulletin, 2013 : Java Humor : Software Engineering Humor : Sun Solaris Related Humor : Education Humor : IBM Humor : Assembler-related Humor : VIM Humor : Computer Viruses Humor : Bright tomorrow is rescheduled to a day after tomorrow : Classic Computer Humor

The Last but not Least Technology is dominated by two types of people: those who understand what they do not manage and those who manage what they do not understand ~Archibald Putt. Ph.D


Copyright © 1996-2021 by Softpanorama Society. www.softpanorama.org was initially created as a service to the (now defunct) UN Sustainable Development Networking Programme (SDNP) without any remuneration. This document is an industrial compilation designed and created exclusively for educational use and is distributed under the Softpanorama Content License. Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.

FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available to advance understanding of computer science, IT technology, economic, scientific, and social issues. We believe this constitutes a 'fair use' of any such copyrighted material as provided by section 107 of the US Copyright Law according to which such material can be distributed without profit exclusively for research and educational purposes.

This is a Spartan WHYFF (We Help You For Free) site written by people for whom English is not a native language. Grammar and spelling errors should be expected. The site contain some broken links as it develops like a living tree...

You can use PayPal to to buy a cup of coffee for authors of this site

Disclaimer:

The statements, views and opinions presented on this web page are those of the author (or referenced source) and are not endorsed by, nor do they necessarily reflect, the opinions of the Softpanorama society. We do not warrant the correctness of the information provided or its fitness for any purpose. The site uses AdSense so you need to be aware of Google privacy policy. You you do not want to be tracked by Google please disable Javascript for this site. This site is perfectly usable without Javascript.

Last modified: June 12, 2020