是否可以在RHEL7上的特定版本17.03中安装DockerCE?
这里有信息:
此处使用Docker 17.03但仅限于Docker EE而不是 Docker CE
答案 0 :(得分:73)
根据文档here,您可以通过以下方式在RHEL 7.3 64位上安装Docker CE 17.03(或未来版本):
在RHEL上设置Docker CE存储库:
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum makecache fast
在RHEL上安装最新版本的Docker CE:
sudo yum -y install docker-ce
或者,您可以指定特定版本的Docker CE:
sudo yum -y install docker-ce-<version>-<release>
启动Docker:
sudo systemctl start docker
测试您的Docker CE安装:
sudo docker run hello-world
答案 1 :(得分:28)
一次性开发测试程序RHEL 7.3。永远不要在生产中这样做。
# pre-requisite for container-selinux-2.9-4.el7.noarch.rpm
sudo yum install policycoreutils-python
wget http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.21-1.el7.noarch.rpm
sudo rpm -i container-selinux-2.21-1.el7.noarch.rpm
#Set up the Docker CE repository on RHEL:
sudo yum install -y yum-utils
sudo yum install -y device-mapper-persistent-data lvm2
sudo yum-config-manager --enable rhel-7-server-extras-rpms
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum makecache fast
# Install the latest version of Docker CE on RHEL:
sudo yum -y install docker-ce
#Start Docker:
sudo systemctl start docker
#Test your Docker CE installation:
sudo docker run hello-world
# configure Docker to start on boot
sudo systemctl enable docker
# add user to the docker group
sudo usermod -aG docker jethro
# install Docker Compose:
# install python-pip
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install ./epel-release-latest-7.noarch.rpm
sudo yum install -y python-pip
sudo pip install docker-compose
# upgrade your Python packages:
sudo yum upgrade python*
以上假设您没有使用代理。如果是,您需要在proxy=http://myproxy:myport
下的每个文件的每个块的末尾添加/etc/yum.repos.d/
行,或者将其添加到/etc/yum.conf
。
希望这有帮助。
答案 2 :(得分:13)
对于那些面临以下错误的人:
Error: Package: docker-ce-17.06.0.ce-1.el7.centos.x86_64 (docker-ce-stable)
Requires: container-selinux >= 2.9
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
在RHEL 7.3+上安装docker时,我们需要执行:
sudo subscription-manager repos --enable rhel-7-server-extras-rpms
将在yum update上安装额外的rpms。执行后:
sudo yum update
然后按照: Install Docker
这对我有用。
答案 3 :(得分:4)
安装DOCKER RHEL / CENTOS
转到:https://download.docker.com/linux/centos/7/x86_64/stable/Packages/
下载:docker-ce-17.03.2.ce-1.el7.centos.x86_64.rpm 2018-06-08 05:48 19M 下载:docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm 2018-06-08 05:48 29K
上传到服务器
yum -y install docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm
yum -y install docker-ce-17.03.2.ce-1.el7.centos.x86_64.rpm
sudo systemctl启动docker
REF: install Docker CE 17.03 on RHEL7 https://nickjanetakis.com/blog/docker-tip-39-installing-docker-ce-on-redhat-rhel-7x https://docs.docker.com/install/linux/docker-ee/rhel/#set-up-the-repository
答案 4 :(得分:3)
好吧也许你可以在RHEL 7.3上实现Docker CE 17.06或17.03的安装,但是Docker文档很清楚:
RHEL不支持Docker Community Edition(Docker CE)。
请参阅https://docs.docker.com/engine/installation/linux/docker-ee/rhel/
答案 5 :(得分:2)
我在运行7.x时遇到了同样的问题,我做了以下事情:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input name="valor-unit-1" />
有了这个,你就不会落在pigz错误上
yum install -y yum-utils
wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -ivh epel-release-latest-7.noarch.rpm
subscription-manager repos --enable=rhel-7-server-extras-rpms
yum install -y http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.55-1.el7.noarch.rpm
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install -y docker-ce
systemctl restart docker
您需要留意 container-selinux ,因为我使用的是2.55-1版本的直接链接
答案 6 :(得分:0)
来自@Matt Schuchard和@Akash Srivastava
将他们的命令组合在一起,我发现下面的命令行对我有用。
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum makecache fast
sudo subscription-manager repos --enable rhel-7-server-extras-rpms
sudo yum update
sudo yum -y install docker-ce
sudo systemctl start docker
谢谢