build: include semgrep in final docker image #1079
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Include the built-from-source Semgrep wheel stored in
macaron-deps
in the final docker image for macaron.Description of changes
The minimal image
macaron-deps
that was created in #1073 (fixed in #1078) stores the python.whl
package for Semgrep, built from source in a new GitHub action. After now confirming the image has been published successfully, this PR now uses this image to include the built-from-source Semgrep wheel in the final docker image for Macaron using multistage Docker builds.There were some necessary changes to the Semgrep image made in this PR. The name of the
.whl
file must be maintained from the build inside the docker container forpip
to use it properly, so this was updated and changed.Inside the final docker build,
Dockerfile.final
, this wheel is now copied into the image and used to install Semgrep. Note that, since Semgrep is part of Macaron's python dependencies, we uninstall the version that is installed by default into the image, which I have confirmed removes the binaries.Checklist
verified
label should appear next to all of your commits on GitHub.