Introduction
Terraform Enterprise (TFE) Flexible Deploy Options (FDO) does not support the version of Docker that is pre-installed on Amazon Linux 2023.
This article will detail the steps required to install a supported version.
Expected Outcome
A compatible version of the Docker engine installed on Amazon Linux 2023.
Prerequisites
- Amazon Linux 2023
Use Case
Your organization requires you to install TFE on Amazon Linux 2023.
Procedure
- Check if Docker is already installed:
sudo dnf list --installed | grep -i docker
If an unsupported version is installed, remove the conflicting packages are detailed in the official Docker documentation. - List the available Docker packages:
sudo dnf search --showduplicates docker
- Select a version from the Docker prerequisites and determine the patch version you wish to install
- Install the desired version. For example, to install
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 the Docker systemd unit:
sudo systemctl enable --now docker
- The default Amazon Linux 2023 repositories don't contain the compose plugin, which is required to use compose files. To install it, follow the manual steps detailed in the official Docker documentation. In summary, this command can be used to install docker-compose system wide for all users.
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 docker compose installation and version
$ docker-compose --version
Docker Compose version v2.32.4
Additional Information
- Prepare the Terraform Enterprise host environment - Requirements - Docker
- Install Docker Engine
- Install the Docker Compose plugin - Install the plugin manually
- Install Docker Engine on RHEL - Uninstall old versions