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

Bump alpine to 3.19 #1274

Merged
merged 2 commits into from
Jan 28, 2024
Merged

Bump alpine to 3.19 #1274

merged 2 commits into from
Jan 28, 2024

Conversation

NickSlowinski
Copy link
Contributor

@NickSlowinski NickSlowinski commented Jan 28, 2024

This PR updates Alpine to version 3.19 which includes fixes for 10 vulnerabilities (8 Medium-level vulnerabilities and 2 Unknown ones).
I will send @dyc3 an email with a screenshot of affected packages and CVE numbers.

Please look in your spam folder too, google flags some of my mails...

Signed-off-by: Nick Slowinski <[email protected]>
@NickSlowinski NickSlowinski requested a review from dyc3 as a code owner January 28, 2024 19:27
Copy link
Contributor

coderabbitai bot commented Jan 28, 2024

Warning

Rate Limit Exceeded

@dyc3 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 19 minutes and 32 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.
Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.
Please see our FAQ for further information.

Commits Files that changed from the base of the PR and between 66a3110 and 68fe10b.

Walkthrough

The Dockerfile has been updated to use a newer version of the Alpine base image, transitioning from node:18-alpine3.16 to node:18-alpine3.19. This change applies to both the build and production stages within the Dockerfile. The configuration for the GIT_COMMIT through ARG and ENV remains unchanged, indicating a focused update primarily for the base image without altering other aspects of the Docker setup.

Changes

File Path Summary of Changes
docker/Dockerfile Updated base image from node:18-alpine3.16 to node:18-alpine3.19 for both build and production stages.

🐇✨
In Docker's land, amidst the code and byte,
A rabbit hopped, under the moon so bright.
From Alpine's peaks, a shift so slight,
3.16 to 3.19, into the night.
🌟🐾

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 2

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 2cec601 and 66a3110.
Files selected for processing (1)
  • docker/Dockerfile (2 hunks)
Additional comments: 7
docker/Dockerfile (7)
  • 1-1: The base image has been updated to node:18-alpine3.19 in the build stage, aligning with the PR's objective to address security vulnerabilities by upgrading to a more secure Alpine version.
  • 2-3: The ARG and ENV for GIT_COMMIT are correctly retained, ensuring that the build metadata can be accurately tracked and associated with specific Git commits. This practice is essential for traceability and debugging.
  • 11-17: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [8-13]

The build process includes running yarn to install dependencies and then yarn run build to compile the application. Afterward, node_modules is removed, and yarn install --production=true is run to install only production dependencies. This is a good practice to reduce the size of the Docker image by excluding development dependencies in the production stage. However, ensure that this does not inadvertently exclude necessary dependencies for the application to run.

  • 14-14: The base image for the production stage has also been updated to node:18-alpine3.19, consistent with the update in the build stage. This ensures that both stages are using the same, secure version of Alpine.
  • 1-4: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [20-20]

The inclusion of FFPROBE_PATH environment variable is specific and necessary for applications that rely on ffprobe for media processing. This explicit path setting ensures that the application can correctly locate and use ffprobe. It's a good practice to explicitly define paths to binary dependencies in Docker environments to avoid path resolution issues.

  • 1-4: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [29-29]

The HEALTHCHECK instruction is a good practice, ensuring that the Docker container's health is monitored and managed by Docker. The use of curl to check the application's status endpoint is a straightforward and effective method. However, ensure that the application is configured to start and listen on the expected port (8080) before the health check runs to avoid false negatives.

  • 1-4: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [32-32]

The command to start the server is correctly specified, ensuring that the database is ready before starting the application. This is a good practice to ensure that the application does not start before its dependencies are ready. However, ensure that the wait_for_db.sh script has appropriate error handling and timeout mechanisms to avoid indefinite waiting in case the database is not available.

docker/Dockerfile Show resolved Hide resolved
Copy link
Owner

@dyc3 dyc3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. Could you update the other dockerfiles too?

Copy link

codecov bot commented Jan 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2cec601) 61.4479% compared to head (68fe10b) 61.5784%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master      #1274        +/-   ##
================================================
+ Coverage   61.4479%   61.5784%   +0.1304%     
================================================
  Files           118        118                
  Lines          9517       9427        -90     
  Branches       1158       1158                
================================================
- Hits           5848       5805        -43     
+ Misses         3669       3622        -47     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dyc3
Copy link
Owner

dyc3 commented Jan 28, 2024

Actually, I'll go ahead and do it so we can get this merged

@NickSlowinski
Copy link
Contributor Author

Sounds good. I am able to patch it tomorrow morning (for me in around 8 hours) while I am on the train.
I did not find any other affected Dockerfile until your message.

deploy/balancer.Dockerfile and .devcontainer/Dockerfile might be out of date too, if there is a suitable bookworm image.

@dyc3 dyc3 merged commit 868dc1a into dyc3:master Jan 28, 2024
16 of 18 checks passed
@NickSlowinski NickSlowinski deleted the update-alpine branch January 29, 2024 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants