Vanshika Jaiswal
Vanshika Jaiswal

Reputation: 21

Docker installation

I know there are 2 ways to install docker on rhel7 : by repo and by packages. I tried installing through repo using link https://docs.docker.com/engine/installation/linux/rhel/#install-docker-ee But during command: sudo yum makecache fast I am getting error

File contains no section header
file: file:///etc/yum.repos.d/docker-ee.repo, line 1
'<!doctype html>'

And I don't know how to install through packages So please tell me one way

Upvotes: 2

Views: 523

Answers (2)

Prateek
Prateek

Reputation: 11

Follow the following steps:

yum update

Put the following text in /etc/yum.repos.d/docker.repo

[dockerrepo] 
name=Docker Repository 
baseurl=https://yum.dockerproject.org/repo/main/centos/7/ 
enabled=1 
gpgcheck=1 
gpgkey=https://yum.dockerproject.org/gpg

Now run the following commands to update the repo and install docker

yum clean all
yum repolist all
yum install docker-engine –y

Upvotes: 1

kstromeiraos
kstromeiraos

Reputation: 5037

The easiest way to install last Docker Engine version is using official installation script of Docker.

To do this, you only have to execute this command, which will retrieve and execute the script.

wget -qO- https://get.docker.com/ | sh

Upvotes: 1

Related Questions