Skip to content

Refactor multi-arch apt setup#267

Merged
0xh3rman merged 7 commits intomainfrom
codex/multiarch-apt-script
Feb 5, 2026
Merged

Refactor multi-arch apt setup#267
0xh3rman merged 7 commits intomainfrom
codex/multiarch-apt-script

Conversation

@0xh3rman
Copy link
Contributor

@0xh3rman 0xh3rman commented Feb 4, 2026

Summary

  • move multi-arch apt setup into a dedicated script
  • keep Dockerfile readable with a single RUN line

Testing

  • not run (Docker build verified earlier)

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @0xh3rman, 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 improving the Docker image build process by refactoring the multi-architecture APT setup. The changes aim to make the Dockerfile cleaner and more modular, while also enhancing the robustness of tool installations across different CPU architectures. This leads to a more maintainable and adaptable build environment.

Highlights

  • Dockerfile Refactoring: The multi-architecture APT setup logic has been extracted from the main Dockerfile into a dedicated shell script, significantly improving the Dockerfile's readability and maintainability by reducing the complexity of the RUN commands.
  • Dynamic just Tool Installation: The installation of the just tool now dynamically determines the correct target architecture (x86_64-unknown-linux-musl or aarch64-unknown-linux-musl) based on the TARGETARCH build argument, enhancing cross-platform compatibility.
  • New Multi-Arch Setup Script: A new script, scripts/setup-multiarch-apt.sh, has been introduced to encapsulate the logic for adding amd64 architecture support and installing necessary amd64 libraries (like libc6 and zlib1g) specifically for arm64 hosts, to support x86_64-only binaries like aapt2 under emulation.
  • Base Image Tag Update: The base image tag in reproducible/base_image_tag.txt has been updated to base-2026-01-30.

🧠 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.

Changelog
  • Dockerfile
    • Removed the JUST_TARGET ARG definition from the initial block.
    • Added TARGETARCH as a build argument.
    • Replaced the inline multi-architecture APT setup RUN command with a COPY instruction for the new setup-multiarch-apt.sh script and a subsequent RUN command to execute it.
    • Modified the just tool installation RUN command to use a case statement to set JUST_TARGET based on the TARGETARCH build argument.
  • reproducible/base_image_tag.txt
    • Updated the base image tag from base-2025-12-18 to base-2026-01-30.
  • scripts/setup-multiarch-apt.sh
    • Added a new executable shell script responsible for configuring multi-architecture support for APT.
    • The script conditionally adds amd64 architecture and configures ubuntu-amd64.sources if the current architecture is arm64.
    • It installs essential libraries (libc6, libstdc++6, zlib1g, libtinfo6, ca-certificates) for the native architecture, and additionally libc6:amd64 and zlib1g:amd64 if running on arm64.
Ignored Files
  • Ignored by pattern: .github/workflows/** (2)
    • .github/workflows/publish-base-image.yml
    • .github/workflows/verify-apk.yml
Activity
  • No specific activity recorded for this pull request.
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 refactors the multi-architecture apt setup into a dedicated script, which improves the readability of the Dockerfile. It also correctly handles multi-arch builds for installing just. The changes are a good improvement, but I've found a couple of potential issues in the new script: a risky default value for the Ubuntu codename and missing packages for amd64 emulation on arm64 hosts compared to the previous implementation. Addressing these will make the setup more robust.

@0xh3rman 0xh3rman force-pushed the codex/multiarch-apt-script branch from 14fe599 to 6dfa455 Compare February 4, 2026 05:55
@0xh3rman 0xh3rman marked this pull request as ready for review February 4, 2026 06:08
@0xh3rman 0xh3rman merged commit ab449f2 into main Feb 5, 2026
2 checks passed
@0xh3rman 0xh3rman deleted the codex/multiarch-apt-script branch February 5, 2026 02:15
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.

2 participants