Deploy Sample Python Flask on AWS EC2 Docker using Github Action


Install docker and docker compose on your ec2 machine

yum update -y
amazon-linux-extras install docker
service docker start
usermod -a -G docker ec2-user
chkconfig docker on

Docker Compose:
sudo curl -L$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose

sudo chmod +x /usr/local/bin/docker-compose

docker-compose version

Configure ecr access on ec2 machine

aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin

If you have still access problem, attach ecr iam role with your ec2

CI/CD Pipeline on Github Action:

Share on Google Plus

About Ashadullah Shawon

I am Ashadullah Shawon. I am a Software Engineer. I studied Computer Science and Engineering (CSE) at RUET. I Like To Share Knowledge. Learn More: Click Here
    Blogger Comment
    Facebook Comment


Post a Comment