Objective:

To install and manage docker containers using portainer on an AWS EC2 instance, integrate GitHub Actions for CICD and deploy a Dockerized web application (Medplus) to AWS ECR

Architecture Components

Step 1: Launch an EC2 Instance

  1. Log in to AWS Console
  2. Navigate to EC2- Launch Instance
  3. Choose Ubuntu, create a new key pair
  4. In security group, open these ports: 22-SSH, 9443- Portainer dashboard, 8000- Portainer agent, 80- web server
  5. Launch the instance and connect to mobaxterm using your public ip address

Step 2: Install docker

On your mobaxterm, input the following command:

sudo apt update

sudo apt upgrade

sudo apt install docker.io