Skip to content

Add /etc/mime.types to static#1832

Merged
loosebazooka merged 1 commit intomainfrom
mimetypes
Aug 4, 2025
Merged

Add /etc/mime.types to static#1832
loosebazooka merged 1 commit intomainfrom
mimetypes

Conversation

@loosebazooka
Copy link
Member

This should apply the file to all images

fixes: #816

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.

Summary of Changes

Hello @loosebazooka, 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 aims to ensure that the /etc/mime.types file is consistently included in all base images by integrating the media-types Debian package into the image build process. This change is intended to provide proper MIME type definitions across all generated images, addressing the issue referenced in #816.

Highlights

  • Base Image Configuration: The media-types Debian package has been added to the list of core packages included in the base_images function within base/base.bzl. This ensures that the /etc/mime.types file, provided by this package, is present in all generated base images.
  • Dependency Management: The private/repos/deb/bookworm.lock.json file has been updated to include specific details (SHA256 hash, URL, version) for the media-types package across multiple architectures (amd64, arm64, armhf, s390x, ppc64el). This locks the version and source of the package for consistent builds.
  • Package Declaration: The media-types package has been explicitly added to the packages list in private/repos/deb/bookworm.yaml, formally declaring it as a required dependency for the bookworm distribution.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue 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 or fill out our survey to provide feedback.

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 adds the media-types package to the base static images to provide /etc/mime.types. The changes in the Bazel build files, package definitions, and lock files are consistent and look correct. I've identified one area for improvement: adding a test to verify the presence of the /etc/mime.types file to prevent future regressions. Otherwise, the changes are good to go.

This should apply the file to all images

Signed-off-by: Appu Goundan <appu@google.com>
@loosebazooka
Copy link
Member Author

just updated tests

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2025

🌳 🔄 Image Check

This pull request has modified the following images:

//base:static_nonroot_arm_debian12
//base:static_root_s390x_debian12
//base:static_nonroot_amd64_debian12
//base:static_root_arm64_debian12
//base:static_nonroot_amd64_debian12
//base:static_root_amd64_debian12
//base:static_root_amd64_debian12
//base:static_debug_root_s390x_debian12
//base:static_root_arm_debian12
//base:static_debug_nonroot_arm_debian12
//base:static_root_ppc64le_debian12
//base:static_debug_root_amd64_debian12
//base:static_nonroot_ppc64le_debian12
//base:static_nonroot_arm64_debian12
//base:static_debug_nonroot_amd64_debian12
//base:static_nonroot_s390x_debian12
//base:static_nonroot_s390x_debian12
//base:static_nonroot_ppc64le_debian12
//base:static_debug_root_ppc64le_debian12
//base:static_debug_nonroot_arm_debian12
//base:static_nonroot_arm_debian12
//base:base_root_arm64_debian12
//base:base_root_amd64_debian12
//base:static_debug_nonroot_ppc64le_debian12
//base:base_root_amd64_debian12
//base:debug_root_arm64_debian12
//base:base_nonroot_arm64_debian12
//base:base_nonroot_amd64_debian12
//base:static_debug_root_s390x_debian12
//base:debug_root_arm64_debian12
//base:static_debug_nonroot_s390x_debian12
//base:debug_nonroot_amd64_debian12
//base:static_root_ppc64le_debian12
//base:static_nonroot_arm64_debian12
//base:static_debug_nonroot_amd64_debian12
//base:static_debug_nonroot_arm64_debian12
//base:static_debug_root_arm64_debian12
//base:static_root_arm_debian12
//base:static_debug_root_arm64_debian12
//base:debug_root_amd64_debian12
//base:base_root_arm_debian12
//base:static_debug_nonroot_ppc64le_debian12
//base:static_debug_nonroot_s390x_debian12
//base:base_nonroot_amd64_debian12
//base:base_nonroot_s390x_debian12
//base:static_root_arm64_debian12
//base:base_nonroot_arm64_debian12
//base:base_nonroot_arm_debian12
//base:debug_root_arm_debian12
//base:base_root_s390x_debian12
//base:base_root_s390x_debian12
//base:debug_nonroot_arm_debian12
//base:debug_root_ppc64le_debian12
//base:debug_nonroot_s390x_debian12
//base:base_root_ppc64le_debian12
//base:static_debug_nonroot_arm64_debian12
//base:debug_nonroot_arm_debian12
//base:debug_nonroot_amd64_debian12
//base:debug_root_s390x_debian12
//base:base_root_ppc64le_debian12
//base:static_debug_root_amd64_debian12
//base:static_debug_root_ppc64le_debian12
//base:base_root_arm_debian12
//base:debug_nonroot_arm64_debian12
//base:base_root_arm64_debian12
//base:base_nonroot_s390x_debian12
//base:base_nonroot_ppc64le_debian12
//base:debug_nonroot_ppc64le_debian12
//base:static_debug_root_arm_debian12
//base:debug_root_arm_debian12
//base:base_nossl_nonroot_amd64_debian12
//base:base_nossl_debug_nonroot_amd64_debian12
//base:base_nonroot_arm_debian12
//base:debug_nonroot_arm64_debian12
//base:base_nossl_debug_root_arm64_debian12
//base:base_nossl_nonroot_amd64_debian12
//base:base_nossl_debug_nonroot_arm_debian12
//base:base_nossl_debug_root_arm_debian12
//base:base_nossl_debug_nonroot_amd64_debian12
//base:base_nossl_root_amd64_debian12
//base:base_nossl_nonroot_arm_debian12
//base:base_nossl_root_s390x_debian12
//base:base_nossl_nonroot_s390x_debian12
//base:static_debug_root_arm_debian12
//base:base_nonroot_ppc64le_debian12
//base:debug_root_s390x_debian12
//base:base_nossl_root_s390x_debian12
//base:debug_nonroot_ppc64le_debian12
//base:debug_root_amd64_debian12
//base:base_nossl_root_arm64_debian12
//base:base_nossl_nonroot_arm64_debian12
//base:base_nossl_debug_nonroot_s390x_debian12
//base:base_nossl_nonroot_arm64_debian12
//base:base_nossl_root_arm64_debian12
//base:base_nossl_debug_root_s390x_debian12
//base:base_nossl_debug_nonroot_arm64_debian12
//base:base_nossl_debug_root_s390x_debian12
//base:base_nossl_root_amd64_debian12
//base:base_nossl_debug_root_arm64_debian12
//base:base_nossl_root_ppc64le_debian12
//base:debug_root_ppc64le_debian12
//base:base_nossl_debug_root_arm_debian12
//base:base_nossl_debug_nonroot_arm64_debian12
//base:base_nossl_debug_nonroot_ppc64le_debian12
//base:debug_nonroot_s390x_debian12
//base:base_nossl_root_arm_debian12
//cc:cc_root_amd64_debian12
//base:base_nossl_debug_nonroot_arm_debian12
//cc:debug_nonroot_amd64_debian12
//base:base_nossl_nonroot_s390x_debian12
//cc:debug_nonroot_arm64_debian12
//base:base_nossl_debug_root_ppc64le_debian12
//base:base_nossl_debug_root_amd64_debian12
//cc:cc_nonroot_arm_debian12
//base:base_nossl_root_ppc64le_debian12
//cc:cc_root_arm_debian12
//base:static_root_s390x_debian12
//cc:cc_root_s390x_debian12
//base:base_nossl_nonroot_ppc64le_debian12
//cc:debug_nonroot_arm64_debian12
//base:base_nossl_debug_nonroot_s390x_debian12
//cc:cc_nonroot_arm64_debian12
//cc:debug_nonroot_arm_debian12
//cc:debug_root_amd64_debian12
//cc:cc_nonroot_amd64_debian12
//cc:debug_nonroot_s390x_debian12
//cc:debug_root_amd64_debian12
//cc:debug_root_s390x_debian12
//cc:cc_nonroot_ppc64le_debian12
//cc:cc_root_arm_debian12
//base:base_nossl_debug_root_amd64_debian12
//cc:debug_root_ppc64le_debian12
//base:base_nossl_root_arm_debian12
//cc:cc_root_s390x_debian12
//base:base_nossl_debug_root_ppc64le_debian12
//cc:debug_nonroot_amd64_debian12
//cc:debug_root_arm_debian12
//cc:cc_nonroot_arm_debian12
//cc:debug_root_arm64_debian12
//cc:cc_root_ppc64le_debian12
//cc:debug_root_s390x_debian12
//cc:cc_root_ppc64le_debian12
//cc:debug_nonroot_arm_debian12
//python3:debug_nonroot_amd64_debian12
//cc:debug_nonroot_ppc64le_debian12
//cc:debug_root_ppc64le_debian12
//python3:python3_root_arm64_debian12
//python3:debug_nonroot_amd64_debian12
//python3:debug_root_amd64_debian12
//cc:debug_nonroot_s390x_debian12
//python3:python3_nonroot_arm64_debian12
//cc:debug_root_arm64_debian12
//python3:debug_nonroot_arm64_debian12
//cc:cc_nonroot_s390x_debian12
//python3:debug_root_arm64_debian12
//cc:cc_root_arm64_debian12
//python3:debug_root_arm64_debian12
//cc:debug_nonroot_ppc64le_debian12
//cc:cc_nonroot_ppc64le_debian12
//cc:cc_nonroot_s390x_debian12
//python3:debug_root_amd64_debian12
//base:base_nossl_nonroot_arm_debian12
//cc:cc_nonroot_amd64_debian12
//base:base_nossl_nonroot_ppc64le_debian12
//python3:python3_nonroot_arm64_debian12
//nodejs:nodejs20_root_amd64_debian12
//cc:cc_nonroot_arm64_debian12
//nodejs:nodejs20_nonroot_amd64_debian12
//python3:python3_nonroot_amd64_debian12
//nodejs:nodejs20_debug_nonroot_amd64_debian12
//nodejs:nodejs20_nonroot_arm_debian12
//base:base_nossl_debug_nonroot_ppc64le_debian12
//cc:cc_root_arm64_debian12
//python3:debug_nonroot_arm64_debian12
//nodejs:nodejs20_root_arm_debian12
//nodejs:nodejs20_nonroot_arm_debian12
//python3:python3_root_amd64_debian12
//nodejs:nodejs20_debug_nonroot_arm64_debian12
//nodejs:nodejs20_debug_root_arm64_debian12
//cc:debug_root_arm_debian12
//python3:python3_root_arm64_debian12
//cc:cc_root_amd64_debian12
//nodejs:nodejs20_root_arm64_debian12
//nodejs:nodejs20_debug_nonroot_arm64_debian12
//nodejs:nodejs20_root_s390x_debian12
//nodejs:nodejs20_debug_root_ppc64le_debian12
//python3:python3_root_amd64_debian12
//nodejs:nodejs20_nonroot_arm64_debian12
//nodejs:nodejs20_nonroot_s390x_debian12
//nodejs:nodejs20_nonroot_ppc64le_debian12
//nodejs:nodejs20_debug_root_amd64_debian12
//nodejs:nodejs20_nonroot_ppc64le_debian12
//nodejs:nodejs20_debug_nonroot_arm_debian12
//nodejs:nodejs20_debug_root_arm64_debian12
//nodejs:nodejs20_debug_root_arm_debian12
//nodejs:nodejs20_debug_nonroot_arm_debian12
//nodejs:nodejs20_debug_nonroot_amd64_debian12
//nodejs:nodejs20_debug_root_arm_debian12
//nodejs:nodejs20_root_amd64_debian12
//nodejs:nodejs22_debug_nonroot_amd64_debian12
//nodejs:nodejs20_debug_nonroot_ppc64le_debian12
//nodejs:nodejs20_debug_root_s390x_debian12
//nodejs:nodejs20_root_ppc64le_debian12
//nodejs:nodejs22_root_arm64_debian12
//nodejs:nodejs22_root_arm64_debian12
//nodejs:nodejs22_nonroot_arm64_debian12
//nodejs:nodejs20_root_arm64_debian12
//nodejs:nodejs22_debug_nonroot_arm64_debian12
//nodejs:nodejs22_nonroot_amd64_debian12
//nodejs:nodejs22_root_amd64_debian12
//python3:python3_nonroot_amd64_debian12
//nodejs:nodejs22_nonroot_arm64_debian12
//nodejs:nodejs22_root_amd64_debian12
//nodejs:nodejs22_nonroot_arm_debian12
//nodejs:nodejs22_nonroot_amd64_debian12
//nodejs:nodejs20_nonroot_amd64_debian12
//nodejs:nodejs22_debug_nonroot_arm_debian12
//nodejs:nodejs22_debug_nonroot_arm64_debian12
//nodejs:nodejs22_debug_root_amd64_debian12
//nodejs:nodejs22_nonroot_arm_debian12
//nodejs:nodejs20_debug_root_amd64_debian12
//nodejs:nodejs22_root_arm_debian12
//nodejs:nodejs22_root_arm_debian12
//nodejs:nodejs22_nonroot_s390x_debian12
//nodejs:nodejs20_root_ppc64le_debian12
//nodejs:nodejs20_root_s390x_debian12
//nodejs:nodejs22_debug_root_amd64_debian12
//nodejs:nodejs22_root_ppc64le_debian12
//nodejs:nodejs22_debug_root_arm64_debian12
//nodejs:nodejs20_nonroot_s390x_debian12
//nodejs:nodejs20_debug_nonroot_s390x_debian12
//nodejs:nodejs22_debug_nonroot_amd64_debian12
//nodejs:nodejs22_root_s390x_debian12
//nodejs:nodejs20_debug_root_s390x_debian12
//nodejs:nodejs22_debug_root_arm64_debian12
//nodejs:nodejs22_nonroot_s390x_debian12
//nodejs:nodejs24_debug_nonroot_amd64_debian12
//nodejs:nodejs22_debug_root_ppc64le_debian12
//nodejs:nodejs22_debug_nonroot_arm_debian12
//nodejs:nodejs24_nonroot_arm64_debian12
//nodejs:nodejs22_debug_root_s390x_debian12
//nodejs:nodejs24_debug_root_amd64_debian12
//nodejs:nodejs22_debug_root_arm_debian12
//nodejs:nodejs24_nonroot_amd64_debian12
//nodejs:nodejs22_nonroot_ppc64le_debian12
//nodejs:nodejs22_nonroot_ppc64le_debian12
//nodejs:nodejs22_debug_root_arm_debian12
//nodejs:nodejs22_root_s390x_debian12
//nodejs:nodejs24_root_amd64_debian12
//nodejs:nodejs24_root_s390x_debian12
//nodejs:nodejs24_debug_root_amd64_debian12
//nodejs:nodejs24_debug_root_arm64_debian12
//nodejs:nodejs20_debug_root_ppc64le_debian12
//nodejs:nodejs24_debug_nonroot_s390x_debian12
//nodejs:nodejs24_debug_root_s390x_debian12
//nodejs:nodejs22_root_ppc64le_debian12
//nodejs:nodejs22_debug_nonroot_ppc64le_debian12
//nodejs:nodejs22_debug_root_ppc64le_debian12
//nodejs:nodejs24_root_arm64_debian12
//nodejs:nodejs24_debug_nonroot_arm64_debian12
//nodejs:nodejs24_debug_nonroot_s390x_debian12
//nodejs:nodejs24_nonroot_s390x_debian12
//nodejs:nodejs22_debug_root_s390x_debian12
//nodejs:nodejs24_nonroot_arm64_debian12
//nodejs:nodejs24_root_arm64_debian12
//nodejs:nodejs24_debug_nonroot_arm64_debian12
//nodejs:nodejs20_debug_nonroot_ppc64le_debian12
//nodejs:nodejs24_root_s390x_debian12
//java:java_base_nonroot_amd64_debian12
//nodejs:nodejs24_debug_nonroot_ppc64le_debian12
//nodejs:nodejs24_debug_root_s390x_debian12
//java:java_base_debug_nonroot_amd64_debian12
//nodejs:nodejs20_root_arm_debian12
//java:java_base_debug_root_amd64_debian12
//nodejs:nodejs24_nonroot_s390x_debian12
//nodejs:nodejs20_debug_nonroot_s390x_debian12
//nodejs:nodejs24_root_ppc64le_debian12
//nodejs:nodejs22_debug_nonroot_ppc64le_debian12
//nodejs:nodejs24_root_ppc64le_debian12
//java:java_base_nonroot_s390x_debian12
//java:java_base_root_s390x_debian12
//java:java_base_debug_nonroot_arm64_debian12
//java:java_base_nonroot_amd64_debian12
//nodejs:nodejs24_nonroot_amd64_debian12
//java:java_base_debug_nonroot_s390x_debian12
//nodejs:nodejs22_debug_nonroot_s390x_debian12
//nodejs:nodejs24_debug_root_ppc64le_debian12
//java:java_base_root_arm64_debian12
//java:java_base_debug_root_amd64_debian12
//java:java_base_debug_root_s390x_debian12
//java:java_base_root_amd64_debian12
//java:java_base_debug_nonroot_amd64_debian12
//nodejs:nodejs24_debug_nonroot_amd64_debian12
//java:java_base_root_ppc64le_debian12
//nodejs:nodejs24_nonroot_ppc64le_debian12
//nodejs:nodejs24_debug_root_arm64_debian12
//nodejs:nodejs24_debug_root_ppc64le_debian12
//nodejs:nodejs24_nonroot_ppc64le_debian12
//nodejs:nodejs22_debug_nonroot_s390x_debian12
//java:java_base_nonroot_arm64_debian12
//nodejs:nodejs24_root_amd64_debian12
//java:java_base_debug_root_arm64_debian12
//nodejs:nodejs24_debug_nonroot_ppc64le_debian12
//nodejs:nodejs20_nonroot_arm64_debian12
//java:java_base_root_amd64_debian12
//java:java_base_nonroot_ppc64le_debian12
//java:java17_root_ppc64le_debian12
//java:java17_debug_nonroot_amd64_debian12
//java:java17_debug_root_arm64_debian12
//java:java21_debug_root_arm64_debian12
//java:java17_root_amd64_debian12
//java:java17_nonroot_ppc64le_debian12
//java:java21_root_ppc64le_debian12
//java:java17_nonroot_arm64_debian12
//java:java17_nonroot_amd64_debian12
//java:java17_debug_nonroot_ppc64le_debian12
//java:java17_root_arm64_debian12
//java:java17_debug_root_ppc64le_debian12
//java:java17_nonroot_amd64_debian12
//java:java17_debug_nonroot_s390x_debian12
//java:java21_debug_nonroot_ppc64le_debian12
//java:java17_debug_nonroot_arm64_debian12
//java:java17_debug_nonroot_amd64_debian12
//java:java17_debug_root_amd64_debian12
//java:java21_debug_root_amd64_debian12
//java:java_base_debug_root_ppc64le_debian12
//java:java21_debug_nonroot_arm64_debian12
//java:java21_nonroot_ppc64le_debian12
//java:java_base_debug_nonroot_ppc64le_debian12
//java:java17_nonroot_s390x_debian12
//java:java21_debug_root_ppc64le_debian12
//java:java21_debug_nonroot_amd64_debian12
//java:java17_debug_root_s390x_debian12
//java:java17_debug_root_amd64_debian12
//java:java21_nonroot_amd64_debian12
//java:java17_root_s390x_debian12
//java:java17_root_amd64_debian12
//java:java21_nonroot_arm64_debian12
//java:java21_root_arm64_debian12
//java:java21_root_amd64_debian12

You can check the details in the report here

@loosebazooka loosebazooka merged commit 86b3d6d into main Aug 4, 2025
11 checks passed
@loosebazooka loosebazooka deleted the mimetypes branch August 4, 2025 15:31
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.

Add mime.types to static image

2 participants