deepfence / deepfence/ThreatMapper

Optimize the deepfence_agent container build

Open
#447 0 comments 0 reactions 1 assignee Claimed by @vadorovsky View on GitHub
area/agent enhancement
Dominant language
TypeScript
Stars
5.3k
Forks
631
PR merge metrics
No merged PRs in 30d

Description

Currently building the `deepfence_agent` container image takes at least 15 minutes, regardless of how small the change is and which component or plugin was modified. That's because building the most of binaries happens in `build.sh` with `docker run` commands, like:

https://github.com/deepfence/ThreatMapper/blob/d00b722d5957f6f7a3c61294418be16b756cdcc7/deepfence_agent/build.sh#L18-L24

By doing that this way, we cannot cache any build results and builds are performed every time from scratch.

The solution for that problem is using Docker buildx multi-stage builds which will allow us to cache build artifacts for each dependency.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.