What is the current way of installing Docker on an AWS EC2 instance running the AMI?
There has been an announcement of Docker Enterprise Edition and now I want to know if anything has changed.
Until now, I have been using yum install docker and do get a Docker versioned at 1.12.6, build 7392c3b/1.12.6 right now (3/3/2017). However, the Docker repository on GitHub tells me that there are already newer releases.
I remember the official Docker (package) repository having a package named docker-engine replacing docker some time ago and now they seem to split the package up into docker-ce and docker-ee, where e.g. "Docker Community Edition (Docker CE) is not supported on Red Hat Enterprise Linux." [Source]
So is or will it still be correct to use the above to get the latest stable Docker version on EC2 instances running the AMI or do I need to pull the package from somewhere else (and if so which one, CE or EE)?
The hardest part to figure all of this out was the container-selinux requirement. Just find the latest version in http://mirror.centos.org/centos/7/extras/x86_64/Packages/ and install that first. In addition EC2 instances may not have a proper entropy generator so haveged may need to be installed.
The difference between the approach I had done previously vs the approach I am presently doing with the terraform module is to utilize the AWS provided Docker packages. This does not include the full docker-compose and what not, but you don't require those packages normally in a server.
Because I am using the one Amazon had provided, it is no longer the latest 18.09 version but the 18.06 version. However, the set up is simpler and I don't have to play catch up to container-selinux.
The only external dependency I use is EPEL to get haveged because you still need a good random source for some applications.
I also relied on the AWS security groups rather than explicitly setting up firewalld and used the SELinux setting that is defaulted in the AMI image.
The question is whether I can continue to do it like this. As already mentioned it’ll install me Docker versioned at 1.12 which is already one if not more minor version updates behind the latest stable release (1.13, before CE/EE) and I wonder if this is due to the usual repository update delay or because the guide and package simply being outdated which requires some replacement work done by me (e.g. somehow getting Docker from their own repository?). Also concerning the latest EE announcement which might change something…
If that is the real solution to this problem this does make me a little sad. However thanks for the hint, I haven’t had too much experience with EC2 yet to get to this conclusion by myself. I always thought it’s the best to use AMI because it (should be) is the most updated and adapted image concerning the EC2 virtualization.
The packages are all updated, the kernel. However I do find Ubuntu much easier for software installation and general support, there are few Amazon Linux resources so difficult things are made even more difficult.