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.

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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠