CI/CD on AWS extremely slow

0

Hi,

So I've configured CodePipeline: connection to GitHub, CodeBuild (builds a Docker image and pushes it to ECR), and deployment using Amazon ECS on a Fargate cluster via service with task number = 1, minimum healthy=50%, maximum healthy=140%.

It takes astonishing 8 minutes(!) to build and push a simple container, also from the logs it is obvious the Docker layer cache is not used. And then the deployment stage takes ~10 minutes.

This is unreal. Is it supposed to be that slow? Are there any ways to make it faster?

Thank you.

df
asked 2 years ago777 views
1 Answer
0

Hi!

it is obvious the Docker layer cache is not used

Why not? can you share the Buildspec file?

Please read the article bellow and take a look at the usage of cache-from during docker build.

The basic idea is pull the previous image from ECR and use it as cache from the current build with the cache-from parameter.

https://aws.amazon.com/blogs/devops/reducing-docker-image-build-time-on-aws-codebuild-using-an-external-cache/

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions