简体   繁体   English

如何在Amazon Linux AMI上安装特定版本的Docker

[英]How to install an specific version of Docker on Amazon Linux AMI

As the Docker team advances with new features frequently, the Amazon Linux AMI repo (amzn-updates) Docker package is not always up to date, hence some latest features are not immediately available (eg when installing Docker with sudo yum install -y docker ). 随着Docker团队不断开发新功能,Amazon Linux AMI repo(amzn-updates)Docker软件包并不总是最新的,因此某些最新功能不立即可用(例如,使用sudo yum install -y docker安装Docker时) 。

How can I install an specific version of Docker on Amazon Linux AMI? 如何在Amazon Linux AMI上安装特定版本的Docker? Are there pros/cons if Installing it with amazon package manager vs manually? 如果使用Amazon Package Manager进行安装与手动安装相比,是否有优点/缺点?

Thanks in advance. 提前致谢。

As Docker Introduces two different flavors (CE and EE) the best and easy way of installing Docker on any system. 由于Docker引入了两种不同的版本(CE和EE),因此是在任何系统上安装Docker的最佳简便方法。 please run the below command and you do not have to do any thing. 请运行以下命令,您无需执行任何操作。

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

if you want to install a specific version of a docker, you can run below command to find what all version of docker is present. 如果要安装特定版本的docker,可以在命令下方运行以查找所有版本的docker。

apt-cache madison docker-ce #(for ubuntu) yum list docker-ce.x86_64 --showduplicates | sort -r #(for centos)

then select the proper version and place it in below command. 然后选择适当的版本并将其放在下面的命令中。

wget -qO- https://get.docker.com/ | sed 's/docker-ce/docker-ce=<DOCKER_VERSION/' | sh

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM