First, we need to connect to the EC2 instance that we just created using SSH. Then, run the following commands to update the system and its packages.
sudo apt update -y
sudo apt upgrade -y
Next, we need to install Docker to deploy applications later. Use the following commands to install Docker:
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
Then proceed to install the necessary Docker libraries.
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
To add data to the RDS instance, we need to install the MySQL Client. Use the following command:
sudo apt install mysql-client
Docker Test
MySQL Client Test
Finally, to clone the source code, we need Git. Check if Git is installed:
Everything is now set up correctly.
Before proceeding to the next steps, we need to clone the project source code.
git clone https://github.com/AWS-First-Cloud-Journey/aws-fcj-container-app.git