Introduction
Terraform Enterprise (TFE) Flexible Deployment Options do not support the version of Docker that is pre-installed on Amazon Linux 2023. This article details the steps required to install a supported version.
Expected Outcome
A compatible version of the Docker engine installed on an Amazon Linux 2023 host.
Prerequisites
- An Amazon Linux 2023 environment.
Use Case
Your organization requires you to install Terraform Enterprise on Amazon Linux 2023.
Procedure
-
Check if Docker is already installed on the system.
$ sudo dnf list --installed | grep -i docker
If an unsupported version is installed, remove the conflicting packages by following the steps in the official Docker documentation on uninstalling old versions.
-
List the available Docker packages in the repository.
$ sudo dnf search --showduplicates docker
- Review the Docker version prerequisites for Terraform Enterprise and select a compatible version from the list generated in the previous step.
-
Install the desired version. This example installs
docker-24.0.5-1.amzn2023.0.1.x86_64.$ sudo dnf -y install docker-24.0.5-1.amzn2023.0.1.x86_64
-
Enable and start the Docker
systemdunit.$ sudo systemctl enable --now docker
-
Install the Docker Compose plugin, which is required by Terraform Enterprise but not included in the default Amazon Linux 2023 repositories. You can install it system-wide by following the manual steps in the Terraform Enterprise host preparation guide.
Run the following command to download and install the latest release of Docker Compose.
$ sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m)" \ -o /usr/bin/docker-compose && \ sudo chmod 755 /usr/bin/docker-compose -
Validate the Docker Compose installation and check its version.
$ docker-compose --version ## Docker Compose version v2.23.3
Note: The version number in the output may vary.