-
Notifications
You must be signed in to change notification settings - Fork 83
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
fix(dockerfile): optimized Dockerfile #3281
base: main
Are you sure you want to change the base?
Conversation
Dockerfile
Outdated
@@ -18,33 +26,41 @@ | |||
|
|||
# Copy final binary into light stage. | |||
FROM debian:bookworm-slim | |||
RUN apt-get update && apt-get install -y ca-certificates wget fio | |||
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates wget fio \ |
Check notice
Code scanning / SonarCloud
Arguments in long RUN instructions should be sorted Low
Dockerfile
Outdated
# Install dependencies | ||
RUN apt-get update && apt-get install -y build-essential git | ||
RUN apt-get update && apt-get install -y --no-install-recommends build-essential git \ | ||
&& rm -rf /var/lib/apt/lists/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not necessary, as this is multi-stage build and the image from the first stage is not used in the final image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the cache deletion, but now the code quality test suggests that the cache must be cleared, is that ok?
Quality Gate passedIssues Measures |
Hello!
This PR optimizes the
Dockerfile
.Changes include:
Category: refactor
Reduced image size from 370MB to 302MB