- Amazon Linux 2 Install Docker
- Amazon Linux Install Pip Docker
- Amazon Ami Install Docker-compose
- Amazon Linux 2 Install Docker-compose
- Amazon Linux Install Docker-compose
- Install Docker-compose Amazon Linux 2
Install VirtualBox Extension Pack. The method described here can be used to install VirtualBox Extension Pack on any host operating system including, Windows, Linux, and Mac. VBox extension pack is not an installer and hence is OS independent. It has to be installed from within VirtualBox. From VirtualBox main window, go to File-Preferences. The Amazon Linux container image is built from the same software components that are included in the Amazon Linux AMI. It's available for use in any environment as a base image for Docker workloads. If you're using the Amazon Linux AMI for applications in Amazon EC2, you can containerize your applications with the Amazon Linux container image.
Estimated reading time: 10 minutesTo get started with Docker EE on Red Hat Enterprise Linux, make sure youmeet the prerequisites, theninstall Docker.
Prerequisites
Docker Community Edition (Docker CE) is not supported on Red Hat Enterprise Linux.
Docker EE repository URL
To install Docker Enterprise Edition (Docker EE), you need to know the Docker EErepository URL associated with your trial or subscription. These instructionswork for Docker EE for Red Hat Enterprise Linux and for Docker EE for Linux, whichincludes access to Docker EE for all Linux distributions. To get thisinformation:
- Go to https://store.docker.com/my-content.
- Each subscription or trial you have access to is listed. Click the Setupbutton for Docker Enterprise Edition for Red Hat Enterprise Linux.
- Copy the URL from the field labeledCopy and paste this URL to download your Edition.
Use this URL when you see the placeholder text <DOCKER-EE-URL>
.
To learn more about Docker EE, seeDocker Enterprise Edition.
OS requirements
To install Docker EE, you need the 64-bit version of Red Hat Enterprise Linux 7running on an x86 hardware platform, or s390x
(IBM Z) architecture.
In addition, you must use the devicemapper
storage driver. On productionsystems, you must use direct-lvm
mode, which requires one or more dedicatedblock devices. Fast storage such as solid-state media (SSD) is recommended.
Uninstall old versions
Older versions of Docker were called docker
or docker-engine
. If these areinstalled, uninstall them, along with associated dependencies.
It’s OK if yum
reports that none of these packages are installed.
The contents of /var/lib/docker/
, including images, containers, volumes, andnetworks, are preserved. The Docker EE package is now called docker-ee
.
Install Docker EE
You can install Docker EE in different ways, depending on your needs:
Most usersset up Docker’s repositories and installfrom them, for ease of installation and upgrade tasks. This is therecommended approach.
Some users download the RPM package and install it manuallyand manage upgrades completely manually. This is useful in situations such asinstalling Docker on air-gapped systems with no access to the internet.
Install using the repository
Amazon Linux 2 Install Docker
Before you install Docker EE for the first time on a new host machine, you needto set up the Docker repository. Afterward, you can install and update Docker EEfrom the repository.
Set up the repository
Remove any existing Docker repositories from
/etc/yum.repos.d/
.Temporarily store the Docker EE repository URL you noted down in theprerequisites in an environment variable.This will not persist when the current session ends.
Store your Docker EE repository URL in a
yum
variable in/etc/yum/vars/
.This command relies on the variable you stored in the previous step.Store your OS version string in
/etc/yum/vars/dockerosversion
. Most usersshould use7
, but you can also use the more specific minor version,starting from7.2
.Install required packages.
yum-utils
provides theyum-config-manager
utility, anddevice-mapper-persistent-data
andlvm2
are required by thedevicemapper
storage driver.Enable the
extras
RHEL repository. This ensures access to thecontainer-selinux
package which is required bydocker-ee
.Depending on cloud provider, you may also need to enable another repository.
For AWS:
Note:
REGION
here is literal, and does not represent the regionyour machine is running in.For Azure:
Use the following command to add the stable repository:
Install Docker EE
Install the latest version of Docker EE, or go to the next step to install aspecific version.
If this is the first time you have refreshed the package index since addingthe Docker repositories, you will be prompted to accept the GPG key, andthe key’s fingerprint will be shown. Verify that the fingerprint matches
77FE DA13 1A83 1D29 A418 D3E8 99E5 FF2E 7668 2BC9
and if so, accept the key.On production systems, you should install a specific version of Docker EEinstead of always using the latest. List the available versions.This example uses the
sort -r
command to sort the results by versionnumber, highest to lowest, and is truncated.Note: This
yum list
command only shows binary packages. To showsource packages as well, omit the.x86_64
from the package name.The contents of the list depend upon which repositories you have enabled,and will be specific to your version of Red Hat Enterprise Linux(indicated by the
.el7
suffix on the version, in this example). Choose aspecific version to install. The second column is the version string. Youcan use the entire version string, but you need to include at least to thefirst hyphen. The third column is the repository name, which indicateswhich repository the package is from and by extension its stability level.To install a specific version, append the version string to the package nameand separate them by a hyphen (-
):Note: The version string is the package name plus the version up tothe first hyphen. In the example above, the fully qualified package nameis
docker-ee-17.06.1.ee.2
.Docker is installed but not started. The
docker
group is created, but nousers are added to the group.Edit
/etc/docker/daemon.json
. If it does not yet exist, create it. Assumingthat the file was empty, add the following contents.For production systems, you must use
direct-lvm
mode, which requires youto prepare the block devices. Follow the procedure in thedevicemapper storage driver guidebefore starting Docker.Start Docker.
Verify that Docker EE is installed correctly by running the
hello-world
image.This command downloads a test image and runs it in a container. When thecontainer runs, it prints an informational message and exits.
Docker EE is installed and running. You need to use sudo
to run Dockercommands. Continue to Linux postinstall to allownon-privileged users to run Docker commands and for other optional configurationsteps.
Upgrade Docker EE
To upgrade Docker EE:
If upgrading to a new major Docker EE version (such as when going fromDocker 17.03.x to Docker 17.06.x),add the new repository.
Run
sudo yum makecache fast
.Follow theinstallation instructions, choosing the new version youwant to install.
Amazon Linux Install Pip Docker
Install from a package
If you cannot use the official Docker repository to install Docker EE, you candownload the .rpm
file for your release andinstall it manually. You will need to download a new file each time you want toupgrade Docker EE.
Enable the
extras
RHEL repository. This ensures access to thecontainer-selinux
package which is required bydocker-ee
.Alternately, obtain that package manually from Red Hat.There is no way to publicly browse this repository.
Go to the Docker EE repository URL associated with yourtrial or subscription in your browser. Go to
rhel/7/x86_64/stable-17.06/Packages
anddownload the.rpm
file for the Docker versionyou want to install.Note: If you have trouble with
selinux
using the packages under the7
directory, try choosing the version-specific directory instead, suchas7.3
.Install Docker EE, changing the path below to the path where you downloadedthe Docker package.
Docker is installed but not started. The
docker
group is created, but nousers are added to the group.Edit
/etc/docker/daemon.json
. If it does not yet exist, create it.Assuming that the file was empty, add the following contents.For production systems, you must use
direct-lvm
mode, which requires youto prepare the block devices. Follow the procedure in thedevicemapper storage driver guidebefore starting Docker.Start Docker.
Verify that Docker EE is installed correctly by running the
hello-world
image.This command downloads a test image and runs it in a container. When thecontainer runs, it prints an informational message and exits.
Amazon Ami Install Docker-compose
Docker EE is installed and running. You need to use sudo
to run Dockercommands. Continue to Post-installation steps for Linuxto allow non-privileged users to run Docker commands and for other optionalconfiguration steps.
Amazon Linux 2 Install Docker-compose
Upgrade Docker EE
To upgrade Docker EE, download the newer package file and repeat theinstallation procedure, using yum -y upgrade
instead of yum -y install
, and pointing to the new file.
Uninstall Docker EE
Amazon Linux Install Docker-compose
Uninstall the Docker EE package:
Images, containers, volumes, or customized configuration files on your hostare not automatically removed. To delete all images, containers, andvolumes:
If desired, remove the
devicemapper
thin pool and reformat the blockdevices that were part of it.
You must delete any edited configuration files manually.
Next steps
Continue to Post-installation steps for Linux
Continue with the User Guide.