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 Dockerfile #3281

Merged
merged 6 commits into from
Oct 15, 2024
Merged

Conversation

No0key
Copy link
Contributor

@No0key No0key commented Sep 12, 2024

Hello!

This PR optimizes the Dockerfile.

Changes include:

  • Combined RUN commands to reduce the number of layers
  • Cached Go dependencies to speed up build times
  • Cleaned up unnecessary apt files to reduce image size
  • Consolidated user creation and permission setting commands

Reduced image size from 370MB to 302MB

category: refactor
ticket: none

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

<!--SONAR_ISSUE_KEY:AZHmzkyNIOFF_XJQ0ARt-->Sort these package names alphanumerically. <p>See more on <a href="https://sonarcloud.io/project/issues?id=ObolNetwork_charon&issues=AZHmzkyNIOFF_XJQ0ARt&open=AZHmzkyNIOFF_XJQ0ARt&pullRequest=3281">SonarCloud</a></p>
@No0key No0key changed the title fix(dockerfile): optimized dockerfile, removed additional docker layers fix(dockerfile): optimized Dockerfile Sep 12, 2024
Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
@No0key No0key requested a review from KaloyanTanev September 29, 2024 11:02
@No0key No0key changed the title fix(dockerfile): optimized Dockerfile dockerfile: optimize Dockerfile Oct 3, 2024
@No0key
Copy link
Contributor Author

No0key commented Oct 10, 2024

@KaloyanTanev can you rerun tests? title name was fixed

@pinebit pinebit changed the title dockerfile: optimize Dockerfile *: optimize Dockerfile Oct 11, 2024
@pinebit
Copy link
Collaborator

pinebit commented Oct 11, 2024

I am good with this PR, will delegate final approval and merge to @KaloyanTanev

Copy link

Copy link
Collaborator

@KaloyanTanev KaloyanTanev left a comment

Choose a reason for hiding this comment

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

Looks good! Sorry for the delay

@KaloyanTanev KaloyanTanev added the merge when ready Indicates bulldozer bot may merge when all checks pass label Oct 15, 2024
@obol-bulldozer obol-bulldozer bot merged commit a05ebe8 into ObolNetwork:main Oct 15, 2024
11 checks passed
pinebit pushed a commit that referenced this pull request Oct 18, 2024
Hello!

This PR optimizes the `Dockerfile`. 

Changes include:
- Combined RUN commands to reduce the number of layers
- Cached Go dependencies to speed up build times
- Cleaned up unnecessary apt files to reduce image size
- Consolidated user creation and permission setting commands

Reduced image size from 370MB to 302MB

category: refactor
ticket: none
KaloyanTanev pushed a commit that referenced this pull request Nov 19, 2024
Hello!

This PR optimizes the `Dockerfile`. 

Changes include:
- Combined RUN commands to reduce the number of layers
- Cached Go dependencies to speed up build times
- Cleaned up unnecessary apt files to reduce image size
- Consolidated user creation and permission setting commands

Reduced image size from 370MB to 302MB

category: refactor
ticket: none
obol-bulldozer bot pushed a commit that referenced this pull request Nov 20, 2024
Cherry-picked commits for v1.2-rc1.

**Test command**

- Add cluster lock and definition files to test peers [#3368](#3368)
- Beacon node simulation [#3361](#3361)
- General UX [#3370](#3370)
- Create real blocks with MEV test [#3378](#3378)
- Version check on beacon tests [#3379](#3379)
- Rename test performance to test infra [#3380](#3380)
- Output file improvements [#3384](#3384)
- Custom number of validators for beacon node simulation [#3385](#3385)

**Charon exit --all**

- initial refactor [#3248](#3248)
- add --all flag [#3272](#3272)
- broadcast all exits [#3288](#3288)
- fetch all exits [#3291](#3291)
- enable exit all [#3296](#3296)
- add custom testnet flags (to enable kurtosis testing) [#3317](#3317)
- improve logging and error handling [#3347](#3347)
- increase default Obol API timeout [#3353](#3353)

**Misc**

- Log leader index [#3334](#3334)
- Add third Charon relay [#3227](#3227)
- Fix promrated network overview stats [#3234](#3234)
- Harden threshold parameter checks [#3242](#3242), [#3297](#3297)
- Dependabot to bump only patch versions for our BLS library [#3352](#3352)
- Optimize Dockerfile [#3281](#3281)

**Tests / pipelines**

- Fix flaky tests [#3309](#3309),  [#3316](#3316), [#3332](#3332)
- Disable intrange linter [#3282](#3282)
- Create automate PR for release [#3310](#3310)
- Use minor versions in pipelines [#3321](#3321)
- Fix trigger-dispatch for release [#3351](#3351) [#3381](#3381)
- Fix linter [#3307](#3307) (partially)

**Docs**

- Launchpad link broken [#3231](#3231)
- Docs typos [#3236](#3236) [#3367](#3367) [#3369](#3369)

All of the rest are tens of PRs with simple version bumps across the stack.

category: misc
ticket: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge when ready Indicates bulldozer bot may merge when all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants