How to Install Container and Docker in Linux 7


#1

Hello Everybody should one take RHN subscription to Install Container and Docker in Linux 7 or without that can be possible …
please provide me complete configuration and installation tutorials for…


#2

There are two possible ways to install Docker on the CentOS 7 system, the one with curl that fetches packages from get.docker.com site and the second method is to use default yum package manager to install it directly.

To install Docker via curl usse:

 # yum update
 # curl -sSL https://get.docker.com/ | sh
 # service docker start
 # docker run hello-world		[for testing]

Install Docker via yum package manager.

 # yum update
 # cat >/etc/yum.repos.d/docker.repo <<-EOF
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/7
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
EOF
 # yum install docker-engine
 # service docker start
 # docker run hello-world		[for testing]

#3

Hello Sir,
many thanks for providing this results but sir lots of times i have tried using extra package kit of EPEL and used that as like yum_server but still problem is same so would there be used any data connection or off line it would be succeeded…


#4

@ashish_linux011

data connection or offline? no idea what you trying to say here, it would be great if you could tell us more clearly exactly where you facing problem, so that we can help you out…


#5

[root@server1 ~]# cat >/etc/yum.repos.d/docker.repo <<-EOF

[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/7
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
EOF
[root@server1 ~]# yum install docker-engine
Loaded plugins: langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
dockerrepo | 2.9 kB 00:00:00
dockerrepo/primary_db | 3.3 kB 00:00:11
Package docker-engine-1.7.1-1.el7.centos.x86_64 already installed and latest version
Nothing to do
[root@server1 ~]# systemctl enable docker.socket
ln -s ‘/usr/lib/systemd/system/docker.socket’ ‘/etc/systemd/system/sockets.target.wants/docker.socket’
[root@server1 ~]# systemctl enable docker
[root@server1 ~]# systemctl start docker
[root@server1 ~]# systemctl start docker.socket
[root@server1 ~]# systemctl status docker
docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled)
Active: failed (Result: exit-code) since Mon 2015-08-03 13:55:18 IST; 49s ago
Docs: https://docs.docker.com
Process: 5221 ExecStart=/usr/bin/docker -d -H fd:// (code=exited, status=127)
Main PID: 5221 (code=exited, status=127)
CGroup: /system.slice/docker.service

Aug 03 13:55:17 server1.example.com systemd[1]: Started Docker Application Container Engine.
Aug 03 13:55:18 server1.example.com docker[5221]: /usr/bin/docker: relocation error: /usr/bin/docker: symbol dm_task_get_info_with_deferred_…ference
Aug 03 13:55:18 server1.example.com systemd[1]: docker.service: main process exited, code=exited, status=127/n/a
Aug 03 13:55:18 server1.example.com systemd[1]: Unit docker.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.


#6

sir when i install the docker-engine it has completed but when i go to start and check the status of the docker it shows and error of failed why?..


#7

You must have device-mapper-event-libs package installed on the system to work docker correctly… Just do:

# yum install device-mapper-event-libs

#8

i am facing this error again n again…

[root@server1 ~]# docker run hello-world
Cannot connect to the Docker daemon. Is ‘docker -d’ running on this host?


#9

still facing same errors…
[root@server1 ~]# yum install device-mapper-event-libs
Loaded plugins: langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Package 7:device-mapper-event-libs-1.02.84-14.el7.x86_64 already installed and latest version
Nothing to do
[root@server1 ~]# systemctl start docker
[root@server1 ~]# systemctl status docker
docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled)
Active: failed (Result: exit-code) since Mon 2015-08-03 14:23:08 IST; 14s ago
Docs: https://docs.docker.com
Process: 20442 ExecStart=/usr/bin/docker -d -H fd:// (code=exited, status=127)
Main PID: 20442 (code=exited, status=127)

Aug 03 14:23:07 server1.example.com systemd[1]: Starting Docker Application Container Engine…
Aug 03 14:23:07 server1.example.com systemd[1]: Started Docker Application Container Engine.
Aug 03 14:23:08 server1.example.com docker[20442]: /usr/bin/docker: relocation error: /usr/bin/docker: symbol dm_task_get_info_with_deferred…ference
Aug 03 14:23:08 server1.example.com systemd[1]: docker.service: main process exited, code=exited, status=127/n/a
Aug 03 14:23:08 server1.example.com systemd[1]: Unit docker.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.


#10

I think it seems to me a bug in device-mapper, just do a upgrade and give a try.

# yum update device-mapper
# systemctl start docker
# systemctl status docker

#11

[root@server1 ~]# yum update device-mapper
Loaded plugins: langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
No packages marked for update
[root@server1 ~]# systemctl start docker
[root@server1 ~]# systemctl status docker
docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled)
Active: failed (Result: exit-code) since Mon 2015-08-03 15:27:45 IST; 9s ago
Docs: https://docs.docker.com
Process: 26457 ExecStart=/usr/bin/docker -d -H fd:// (code=exited, status=127)
Main PID: 26457 (code=exited, status=127)

Aug 03 15:27:45 server1.example.com systemd[1]: Started Docker Application Container Engine.
Aug 03 15:27:45 server1.example.com docker[26457]: /usr/bin/docker: relocation error: /usr/bin/docker: symbol dm_task_get_info_with_deferred…ference
Aug 03 15:27:45 server1.example.com systemd[1]: docker.service: main process exited, code=exited, status=127/n/a
Aug 03 15:27:45 server1.example.com systemd[1]: Unit docker.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.


#12

Sir I need your precious help to do linux web hosting with its all parallel activities, so from where I could get these things on my own behalf or any training centres with multiple activities. …
Please share me your valuable support I will be very obliged to you…


#13

Hello sir i am really unable to execute all previous topics whatever we have discussed and i am getting really stuck in docker what is problem is being happen again n again…


#14

Still the issue remains? same error? can I have access to your server to cross check everything…


#15

Yeah sir I will provide but how it can be Possible to access …


#16

Hi guys,

I saw couple times articles talking about installing Docker on different Linux distributions. But my question is that what about the next step. Assume I install Docker on my Linux box how can I get in to that? How can I assign that an IP address?

Ravisaive, I appreciated it if you have a little discuss about that or give me a link about the answer of these questions.


#17

[root@server1 ~]# tar xfz ApacheGUI-1.9.7_1.tar.gz

gzip: stdin: unexpected end of file
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now

what is going on in above commands?


#18

That means your package is corrupted or not downloaded completely…try to download again and untar it…


#19

Guys,

Saw the complete thread, I just want to help you out for docker issue.

Give me the below info to give you the solution.

  1. OS & kernel version.
  2. docker version & docker engine version ( if you tried with both )

I suggest go with coreos which is specially meant for docker containers, instead of using any other OS’s.