Skip to content

Move gosec download into first Docker build stage

Daniel Paul Searles requested to merge docker-optimization into master

What does this MR do?

Move gosec download into first Docker build stage

Why:

  • Downloading gosec with ADD is convenient but caches the tarball so that it can't be removed in a later Docker layer.

This change addresses the need by:

  • Move the gosec tarball download, validation, and untar into build stage.

Side effects:

  • A slightly smaller Docker image is created.

What are the relevant issue numbers?

Does this MR meet the acceptance criteria?

Merge request reports