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

optimize: Simplify and clean up Dockerfile #8244

Merged
merged 1 commit into from
Nov 14, 2023

Conversation

Leke-Ariyo
Copy link
Contributor

What this PR does / why we need it:
Optimizes the Dockerfile for better efficiency and readability.

Special notes for your reviewer:
Please pay attention to the Trivy installation simplification.

Details:

  • Grouped related environment variables to reduce Docker layers.
  • Used a case statement for Trivy installation to simplify the process.
  • Removed unnecessary commands and combined related ones for efficiency.
  • Added comments throughout the Dockerfile for clarity.

How to test this PR:

  1. Build the Docker image using the updated Dockerfile.
  2. Run the container and ensure all functionalities are working as expected.

Screenshots:
N/A

Additional context:
This optimization aims to make the Dockerfile more maintainable and efficient.

@Leke-Ariyo Leke-Ariyo requested a review from a team as a code owner August 24, 2023 21:21
@dereknola
Copy link
Member

@Leke-Ariyo Thank you for the community PR. Per CNCF guidelines, all commits must be signed to pass DCO. Please see https://github.com/k3s-io/k3s/pull/8244/checks?check_run_id=16194110860.

@Leke-Ariyo
Copy link
Contributor Author

@Leke-Ariyo Thank you for the community PR. Per CNCF guidelines, all commits must be signed to pass DCO. Please see https://github.com/k3s-io/k3s/pull/8244/checks?check_run_id=16194110860.

done @dereknola

@codecov
Copy link

codecov bot commented Aug 25, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c7c339f) 45.11% compared to head (073a172) 49.22%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8244      +/-   ##
==========================================
+ Coverage   45.11%   49.22%   +4.11%     
==========================================
  Files         148      148              
  Lines       15674    15674              
==========================================
+ Hits         7071     7716     +645     
+ Misses       7457     6715     -742     
- Partials     1146     1243      +97     
Flag Coverage Δ
e2etests 46.94% <ø> (?)
inttests 40.88% <ø> (-1.70%) ⬇️
unittests 17.87% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 50 files with indirect coverage changes

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

Dockerfile.dapper Show resolved Hide resolved
Dockerfile.dapper Outdated Show resolved Hide resolved
@dereknola
Copy link
Member

We can ignore the failure on secrets-encryption, the test is flaky and is being fixed in another PR.

@Leke-Ariyo
Copy link
Contributor Author

We can ignore the failure on secrets-encryption, the test is flaky and is being fixed in another PR.

Thanks, sounds good @dereknola . I have committed your suggestion

@dereknola
Copy link
Member

Looks like your new commit was signed, so you invalidated the DCO again.

@Leke-Ariyo
Copy link
Contributor Author

Looks like your new commit was signed, so you invalidated the DCO again.

I just signed

@dereknola
Copy link
Member

@Leke-Ariyo We are out of code freeze (last 2 months releases were back to back). Can you please rebase off master/resolve your conflicts?

@dereknola dereknola force-pushed the master branch 2 times, most recently from dbc89a2 to 3675dd8 Compare November 1, 2023 16:21
Signed-off-by: leke-ariyo <lekeariyo2015@gmail.com>
@Leke-Ariyo
Copy link
Contributor Author

looks like all is good to go, I do not have merge access

@brandond
Copy link
Member

brandond commented Nov 7, 2023

we are in code freeze for a +k3s2 release. Nothing is being merged until that is complete.

@dereknola dereknola merged commit 0011eb5 into k3s-io:master Nov 14, 2023
15 checks passed
brandond pushed a commit to brandond/k3s that referenced this pull request Jan 10, 2024
Signed-off-by: leke-ariyo <lekeariyo2015@gmail.com>
brandond pushed a commit to brandond/k3s that referenced this pull request Jan 10, 2024
Signed-off-by: leke-ariyo <lekeariyo2015@gmail.com>
brandond pushed a commit to brandond/k3s that referenced this pull request Jan 10, 2024
Signed-off-by: Leke Ariyo <lekeariyo2015@gmail.com>
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
brandond pushed a commit to brandond/k3s that referenced this pull request Jan 10, 2024
Signed-off-by: Leke Ariyo <lekeariyo2015@gmail.com>
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
brandond pushed a commit that referenced this pull request Jan 12, 2024
Signed-off-by: Leke Ariyo <lekeariyo2015@gmail.com>
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
brandond pushed a commit that referenced this pull request Jan 12, 2024
Signed-off-by: Leke Ariyo <lekeariyo2015@gmail.com>
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
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.

3 participants