Member-only story
Setting up Docker-Compose on AWS AMI Linux
This is just a brief and quick tutorial on how to setup docker-compose on a base T2 Micro or any AWS AMI Linux. Basic AMI Linux is based upon Cento 7. So try to find tutorials on Centos.
Setup 1: Setup the DOCKER_HOST environment variable
export DOCKER_HOST=127.0.0.1
We need this variable set in order for docker-compose to understand that the current Virtual Machine (VM) will be our host system. Technically you could use docker-machine if you want to have another assigned VM within a VM. For this instance, the t2.micro will be our docker host.
Step 2: Install Docker-Compose on Cento
sudo curl -L βhttps://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)β -o /usr/local/bin/docker-compose
You can always change the version of 1.23.2 if needed. Next, we need to setup executable permissions to our docker-compose
sudo chmod +x /usr/local/bin/docker-compose
Now to verify that docker compose is indeed installed and also change the version; run the following within a terminal.
docker-compose --version