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
已提問 2 年前檢視次數 748 次
1 個回答
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/

已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南