Skip to content

fix: dockerfile build errors#8735

Merged
nazarhussain merged 1 commit intoChainSafe:unstablefrom
barnabasbusa:patch-2
Jan 12, 2026
Merged

fix: dockerfile build errors#8735
nazarhussain merged 1 commit intoChainSafe:unstablefrom
barnabasbusa:patch-2

Conversation

@barnabasbusa
Copy link
Contributor

Updated Dockerfile to streamline installation and build process.

Motivation

After the last PR, the dockerfile wasn't building anymore. This PR fixes it.

Description

Closes #issue_number

AI Assistance Disclosure

Updated Dockerfile to streamline installation and build process.
@barnabasbusa barnabasbusa requested a review from a team as a code owner January 12, 2026 09:51
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @barnabasbusa, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on rectifying build failures within the Docker environment by modernizing the dependency management and build steps. It integrates corepack to standardize pnpm usage and streamlines the installation commands, resulting in a more reliable and efficient Docker image creation process.

Highlights

  • Dockerfile Build Fixes: Addressed and resolved issues preventing the Dockerfile from building successfully, ensuring a stable and functional build process.
  • Corepack Integration: Updated the Dockerfile to leverage corepack for managing pnpm installations and rebuilds, enhancing consistency and control over package manager versions.
  • Streamlined PNPM Commands: Refined pnpm install commands by removing redundant flags and ensuring that production-only dependencies are installed efficiently, contributing to a more optimized build.
  • CI Environment Variable: Introduced ENV CI=true to the Docker build environment, which can influence how certain packages or scripts behave during the continuous integration process.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request successfully fixes the Docker build issues by updating the Dockerfile to use corepack for managing pnpm. The changes are a good step forward. I've included a couple of suggestions to further optimize the Dockerfile for better build performance and maintainability, such as using pnpm prune for dependency pruning and structuring the stages to avoid redundant commands.

Comment on lines +11 to +14
RUN corepack enable && corepack prepare --activate && \
pnpm install --frozen-lockfile && \
pnpm build && \
pnpm install --non-interactive --frozen-lockfile --production
pnpm install --frozen-lockfile --prod
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

For better performance and to follow pnpm best practices, consider using pnpm prune --prod to remove development dependencies instead of running pnpm install again with the --prod flag. pnpm prune is specifically designed for this purpose and is more efficient as it only removes extraneous packages.

RUN corepack enable && corepack prepare --activate && \
  pnpm install --frozen-lockfile && \
  pnpm build && \
  pnpm prune --prod

Copy link
Contributor

Choose a reason for hiding this comment

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

pnpm prune is an interactive command, not good for CI.


# Rebuild native deps
RUN pnpm rebuild
RUN corepack enable && pnpm rebuild
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The corepack enable command is run in both the build_src and build_deps stages. To optimize the build process and reduce redundancy, you could create a common base stage where corepack is enabled once.

For example:

FROM node:24-slim AS base
RUN corepack enable

FROM base AS build_src
# ... no need for corepack enable here

FROM base AS build_deps
# ... no need for corepack enable here

This would make the Dockerfile cleaner and potentially faster to build if the base layer is cached.

Copy link
Member

@matthewkeil matthewkeil left a comment

Choose a reason for hiding this comment

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

Looks OK to me but would like @nazarhussain to give final approval as he is the person that worked on our pnpm transition

@nazarhussain nazarhussain merged commit 88333c8 into ChainSafe:unstable Jan 12, 2026
19 checks passed
@codecov
Copy link

codecov bot commented Jan 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.02%. Comparing base (847837e) to head (5783a3e).
⚠️ Report is 1 commits behind head on unstable.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #8735   +/-   ##
=========================================
  Coverage     52.02%   52.02%           
=========================================
  Files           848      848           
  Lines         64650    64650           
  Branches       4767     4767           
=========================================
  Hits          33632    33632           
  Misses        30949    30949           
  Partials         69       69           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@wemeetagain
Copy link
Member

🎉 This PR is included in v1.39.0 🎉

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.

4 participants