Skip to content

Deploying Docker containers on AWS Fargate with Terraform

Notifications You must be signed in to change notification settings

mshauneu/fargate-terraform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deploying Docker container on AWS Fargate with Terraform

Init:

cd terraform
terraform init

Use Elastic Container Registry to store docker image:

terraform apply --target aws_ecr_repository.app

Login to Elastic Container Repository:

$(aws ecr get-login --region $(terraform output aws_region) --no-include-email)

Build and publish docker:

docker build -t app ..
docker tag app $(terraform output app-repo):latest
docker push $(terraform output app-repo):latest

Review:

terraform plan

Deploy:

terraform apply

Test:

curl $(terraform output alb_dns_name)

Destroy:

terraform destroy

About

Deploying Docker containers on AWS Fargate with Terraform

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published