Skip to content
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

use distroless base image #137

Merged
merged 1 commit into from
Aug 10, 2023
Merged

use distroless base image #137

merged 1 commit into from
Aug 10, 2023

Conversation

matthyx
Copy link
Contributor

@matthyx matthyx commented Aug 8, 2023

this one requires a modification in the Helm chart:

securityContext:
  fsGroup: 65532
  runAsUser: 65532

and:

- name: grype-db-cache
  mountPath: /home/nonroot/anchore-resources/db
- name: grype-db
  mountPath: /home/nonroot/.cache/grype

Signed-off-by: Matthias Bertschy <matthias.bertschy@gmail.com>
@codiumai-pr-agent
Copy link

PR Analysis

  • 🎯 Main theme: Changing the base image of the Dockerfile to use distroless
  • 📌 Type of PR: Enhancement
  • 🧪 Relevant tests added: No
  • Focused PR: Yes, the PR is focused as it only changes the base image of the Dockerfile
  • 🔒 Security concerns: No, the changes in this PR do not introduce any obvious security concerns.

PR Feedback

  • General suggestions: The PR is generally well done, but it would be beneficial to add a comment explaining why the base image is being changed to distroless. This would help other developers understand the reasoning behind this change.

  • 🤖 Code feedback:

    • relevant file: build/Dockerfile
      suggestion: Consider adding a comment explaining why you are changing the base image to distroless. This will help other developers understand the reasoning behind this change. [medium]
      relevant line: FROM gcr.io/distroless/static-debian11:nonroot

    • relevant file: build/Dockerfile
      suggestion: It's a good practice to pin the version of the base image to ensure the build's reproducibility. Consider specifying a version for the distroless image. [important]
      relevant line: FROM gcr.io/distroless/static-debian11:nonroot

    • relevant file: build/Dockerfile
      suggestion: It's recommended to use absolute paths for the WORKDIR instruction. This will ensure that the instruction works as expected regardless of the current working directory. [medium]
      relevant line: WORKDIR /home/nonroot/

How to use

To invoke the PR-Agent, add a comment using one of the following commands:
/review [-i]: Request a review of your Pull Request. For an incremental review, which only considers changes since the last review, include the '-i' option.
/describe: Modify the PR title and description based on the contents of the PR.
/improve: Suggest improvements to the code in the PR.
/ask <QUESTION>: Pose a question about the PR.

To edit any configuration parameter from 'configuration.toml', add --config_path=new_value
For example: /review --pr_reviewer.extra_instructions="focus on the file: ..."
To list the possible configuration parameters, use the /config command.

@github-actions
Copy link

github-actions bot commented Aug 8, 2023

Summary:

  • License scan: failure
  • Credentials scan: success
  • Vulnerabilities scan: failure
  • Unit test: success
  • Go linting: success

@matthyx matthyx requested a review from dwertent August 8, 2023 14:35
@dwertent dwertent marked this pull request as ready for review August 8, 2023 16:11
@github-actions
Copy link

github-actions bot commented Aug 8, 2023

Summary:

  • License scan: failure
  • Credentials scan: success
  • Vulnerabilities scan: failure
  • Unit test: success
  • Go linting: success

@matthyx matthyx added the release Create release label Aug 10, 2023
@matthyx matthyx merged commit e7b8d3d into main Aug 10, 2023
9 of 10 checks passed
@matthyx matthyx deleted the distroless branch August 10, 2023 12:38
dwertent pushed a commit that referenced this pull request Dec 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release Create release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants