Skip to content

build: include semgrep in final docker image #1079

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 15, 2025

Conversation

art1f1c3R
Copy link
Member

@art1f1c3R art1f1c3R commented May 14, 2025

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 for pip 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

  • I have reviewed the contribution guide.
  • My PR title and commits follow the Conventional Commits convention.
  • My commits include the "Signed-off-by" line.
  • I have signed my commits following the instructions provided by GitHub. Note that we run GitHub's commit verification tool to check the commit signatures. A green verified label should appear next to all of your commits on GitHub.
  • I have updated the relevant documentation, if applicable.
  • I have tested my changes and verified they work as expected.

Signed-off-by: Carl Flottmann <carl.flottmann@oracle.com>
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label May 14, 2025
art1f1c3R added 5 commits May 15, 2025 11:11
Signed-off-by: Carl Flottmann <carl.flottmann@oracle.com>
Signed-off-by: Carl Flottmann <carl.flottmann@oracle.com>
…h fix

Signed-off-by: Carl Flottmann <carl.flottmann@oracle.com>
Signed-off-by: Carl Flottmann <carl.flottmann@oracle.com>
Signed-off-by: Carl Flottmann <carl.flottmann@oracle.com>
@art1f1c3R art1f1c3R marked this pull request as ready for review May 15, 2025 05:36
@art1f1c3R art1f1c3R merged commit 979b05b into main May 15, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants