Reputation:
I'm a beginner of docker,I use CentOS6.5.
I want to specify installation path of docker.
I want to know how to install the Docker CE version and how to install it into specified path?
For example,this path:/opt/docker
.
Upvotes: 0
Views: 1014
Reputation:
I encountered a mistake like this:
Error: Package: docker-ce-18.03.1.ce-1.el7.centos.x86_64 (docker-ce-edge) Requires: container-selinux >= 2.9 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest
Then I use this command to fix it.
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
After that,I use this command to install docker,yum -y install docker-io
,I need run the command on centOS6.
Then there is no error.
Upvotes: 0
Reputation: 1172
You can use official docker instruction to install docker-ce on CentOS.
For installing in a specific path, you can use yum install
command with --installroot=root
switch. Something like this:
sudo yum install docker-ce docker-ce-cli containerd.io --installroot=/opt/docker
Upvotes: 1