<aside> 🏹

As part of setting up our CI/CD infrastructure, we provisioned a self-hosted GitHub Actions runner inside a Docker container on an EC2 instance. Below is a detailed walkthrough of what we did:

</aside>

Step 1. Launching an EC2 Instance

Step 2. Configuring docker runner Files

In the infrastruture repo, we configured the the runner files to match our variables

Step 3. Connecting via MobaXterm

Step 4. Installing Required Packages on EC2

sudo apt update && apt install docker.io docker-compose -y
sudo apt install tree

#added the Ubuntu user to the Docker group to allow non-root Docker access:
sudo usermod -aG docker ubuntu
exit # logout and re-login for group change to apply
sudo su - ubuntu
sudo usermod -aG docker ubuntu
exit # logout and re-login for group change to apply
sudo su - ubuntu

image.png