Member-only story

Setting up Docker-Compose on AWS AMI Linux

βš— Kevin Summersill πŸ”‹
1 min readApr 19, 2019

--

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

--

--

βš— Kevin Summersill πŸ”‹
βš— Kevin Summersill πŸ”‹

Written by βš— Kevin Summersill πŸ”‹

Enterprise Solution Architect | Certified K8s Administrator/Developer βš“ | SAFe SPC | Cert Terraform | AWS Solutions Architect | Dev*Ops/GitOps Engineer πŸ”₯

No responses yet