google / turbinia

Automation and Scaling of Digital Forensics Tools
Apache License 2.0
735 stars 161 forks source link

Speedup e2e docker image builds #1391

Closed hacktobeer closed 10 months ago

hacktobeer commented 10 months ago

Description of the change

Speedup the e2e docker image builds. By changing the build tools from a simple docker build to using Buildkit in combination with Github Actions Caching there is a greater change of hitting the docker layer cache on subsequent builds for the docker images in the e2e test.

See below link where the build times for api-server, server and worker were brought down to 29, 27 and 54 seconds. https://github.com/hacktobeer/turbinia/actions/runs/6795148691/job/18472715886

Note: The cache hits are not guaranteed and depend on the changes made in the PR!

Additional information

Github Actions Cache -> https://docs.docker.com/build/cache/backends/gha/ Buildkit -> https://docs.docker.com/build/buildkit/

Checklist