Skip to content

Optimize docker image#1172

Merged
ikhoon merged 2 commits intoline:mainfrom
sh-cho:optimize-docker-image
Sep 2, 2025
Merged

Optimize docker image#1172
ikhoon merged 2 commits intoline:mainfrom
sh-cho:optimize-docker-image

Conversation

@sh-cho
Copy link
Copy Markdown
Contributor

@sh-cho sh-cho commented Sep 1, 2025

Motivation:

Currently docker image has all client binaries inside, also copied twice under bin/* and bin/native/*. Only single client binary file is enough. Image below is layer info inside ghcr.io/line/centraldogma:0.77.2 (used dive)
Also linux/arm64 image doesn't have linux/arm64 client binary.

77055

Modification:

  • Use centraldogma-go 0.1.1 version. Since 0.1.1, linux/arm64 binary is available.
  • In dockerfile, copy only one client binary for same target architecture
  • Other changes

Result:

  • Only one client binary is included in docker image. image size is shrinked from 379M to 331M (-12.6%, checked with docker inspect)
41844
  • linux/arm64 image contains linux/arm64 client binary

Summary by CodeRabbit

  • Chores
    • Removed Docker-related entries from the build configuration to streamline the toolchain and reduce maintenance.
    • May slightly improve build times and avoid fetching unused artifacts in local and CI environments.
    • No user-facing functionality or interfaces were changed; application behavior remains the same.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Sep 1, 2025

Walkthrough

Removed Docker-related entries from dependencies.toml: deleted the docker version under [versions] and the corresponding docker plugin declaration under [plugins]. No other changes were made.

Changes

Cohort / File(s) Summary
Build config cleanup
dependencies.toml
Removed [versions].docker = "9.4.0" and [plugins].docker = { id = "com.bmuschko.docker-remote-api", version.ref = "docker" }.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

I nibbled old Docker from our leafy scroll,
Hop! off the page, a lighter role.
No engine’s rumble, no plugin’s tune—
Just cleaner fields beneath the moon.
Thump-thump, the repo feels so spry. 🐇


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 1b98ca3 and 45f29f7.

⛔ Files ignored due to path filters (3)
  • dist/Dockerfile is excluded by !**/dist/**
  • dist/build.gradle is excluded by !**/dist/**
  • dist/src/bin/dogma is excluded by !**/dist/**
📒 Files selected for processing (1)
  • dependencies.toml (0 hunks)
💤 Files with no reviewable changes (1)
  • dependencies.toml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: build-ubuntu-latest-jdk-21-snapshot
  • GitHub Check: build-windows-latest-jdk-21
  • GitHub Check: build-ubuntu-latest-jdk-17-coverage
  • GitHub Check: build-ubuntu-latest-jdk-17-min-java-11
  • GitHub Check: build-ubuntu-latest-jdk-11
  • GitHub Check: build-macos-latest-jdk-21
  • GitHub Check: lint
  • GitHub Check: flaky-tests
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • 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.
  • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • 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/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@sh-cho sh-cho marked this pull request as draft September 1, 2025 16:06
Signed-off-by: Seonghyeon Cho <seonghyeoncho96@gmail.com>
Signed-off-by: Seonghyeon Cho <seonghyeoncho96@gmail.com>
@sh-cho sh-cho force-pushed the optimize-docker-image branch from 1b98ca3 to 45f29f7 Compare September 1, 2025 16:07
@sh-cho sh-cho marked this pull request as ready for review September 1, 2025 16:08
@sh-cho
Copy link
Copy Markdown
Contributor Author

sh-cho commented Sep 1, 2025

Q. I just changed client binary name to use underscore (ex. dogma.linux-amd64 -> dogma.linux_amd64), to maintain gradle script more consistent. This would introduce breaking changes. Is it ok or not?
If client binary name shouldn't be changed, it's also ok but string replace codes would be placed, because client artifact name is currently using underscores (ex. dogma_0.1.1_darwin_amd64.tar.gz)

Copy link
Copy Markdown
Contributor

@minwoox minwoox left a comment

Choose a reason for hiding this comment

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

Looks great, thanks!

Client binary name is changed. It uses underscore now.

What's the rationale behind this, by the way?

@minwoox
Copy link
Copy Markdown
Contributor

minwoox commented Sep 2, 2025

If client binary name shouldn't be changed, it's also ok but string replace codes would be placed, because client artifact name is currently using underscores (ex. dogma_0.1.1_darwin_amd64.tar.gz)

I just read this. 👍

Copy link
Copy Markdown
Contributor

@ikhoon ikhoon left a comment

Choose a reason for hiding this comment

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

Thanks!

Comment thread dist/Dockerfile

COPY --chmod=755 \
build/dist/bin/native/dogma.linux_${TARGETARCH} \
"$CENTRALDOGMA_HOME"/bin/native/
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

@ikhoon ikhoon added this to the 0.78.0 milestone Sep 2, 2025
@ikhoon ikhoon added the cleanup label Sep 2, 2025
@ikhoon ikhoon merged commit 93763ab into line:main Sep 2, 2025
8 of 10 checks passed
@minwoox minwoox modified the milestones: 0.78.0, 0.77.3 Sep 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants