feat: add solc to coordinator docker image#1615
Conversation
WalkthroughThe coordinator API Dockerfile has been updated to modify the installation and setup process. The changes include installing the Changes
Suggested reviewers
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 golangci-lint (1.62.2)level=warning msg="[runner] Can't run linter goanalysis_metalinter: buildir: failed to load package zstd: could not load export data: no export data for "github.com/scroll-tech/da-codec/encoding/zstd"" 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (1)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
build/dockerfiles/coordinator-api.Dockerfile (2)
43-43: Enhance Package Installation CommandIncluding
wgetin the apt install command is essential for downloading the Solidity compiler. However, the command also installs several additional utilities (e.g.,vim,netcat-openbsd,net-tools,curl,jq) which may not be strictly necessary in a production coordinator image. Consider reviewing whether all these packages are required. Also, it would be beneficial to clean up apt caches afterward to reduce the final image size.RUN apt update && apt install vim netcat-openbsd net-tools curl jq wget -y +RUN apt clean && rm -rf /var/lib/apt/lists/*
46-46: Download Solidity Compiler with Version ConsiderationsDownloading
solcfrom a specific GitHub release ensures a consistent environment. For future maintainability, consider parameterizing the Solidity compiler version via a build argument so that updating becomes simpler without modifying the Dockerfile directly. For example:- RUN wget https://github.com/ethereum/solidity/releases/download/v0.8.19/solc-static-linux -O /usr/local/bin/solc + ARG SOLC_VERSION=v0.8.19 + RUN wget https://github.com/ethereum/solidity/releases/download/$SOLC_VERSION/solc-static-linux -O /usr/local/bin/solc
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
build/dockerfiles/coordinator-api.Dockerfile(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: tests
- GitHub Check: rollup_relayer
- GitHub Check: gas_oracle
🔇 Additional comments (2)
build/dockerfiles/coordinator-api.Dockerfile (2)
45-45: Ensure Directory Exists for Binary InstallationThe addition of
RUN mkdir -p /usr/local/binguarantees that the target directory exists for placing thesolcbinary. This is a good practice that prevents potential errors during the download step.
47-47: Set Executable Permission for solcUsing
chmod +x /usr/local/bin/solccorrectly ensures that the downloaded Solidity compiler is executable. This command is appropriate and well-placed.
Purpose or design rationale of this PR
Describe your change. Make sure to answer these three questions: What does this PR do? Why does it do it? How does it do it?
PR title
Your PR title must follow conventional commits (as we are doing squash merge for each PR), so it must start with one of the following types:
Deployment tag versioning
Has
tagincommon/version.gobeen updated or have you addedbump-versionlabel to this PR?Breaking change label
Does this PR have the
breaking-changelabel?Summary by CodeRabbit
New Features
Version Update