This project contains a few bash scripts to build a Docker image and register it on Amazon ECR (Amazon Elastic Container Service). The image can then be used to run tasks on an Amazon ECS cluster (further scripts/templates to come to build the cluster and deploy the tasks). A very rudimentary Python Flask app is also included.
This project was built on a MacOS environment with the following tools installed:
Make sure you configure your AWS credentials (typically located at ~/.aws/credentials
).
Here's the list of scripts available:
build_image.sh
: build the Docker image (see Dockerfile file)publish_version
: registers the image on Amazon ECRrun_locally
: runs Docker image locally (for local tests)kill_locally
: kills the running container
The ECS cluster was manually created via the AWS Console to run the sample Flask app as an ECS task. Time permitting, I'll add scripts and templates to create the cluster here. Meanwhile, take a look at this blog post to learn how to deploy a cluster with AWS Fargate and never manage a server again :).