Skip to content

Conversation

@kopernic-pl
Copy link

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\.
  • Filed the PR against the correct branch: 3.0.0 branch for changes related to OpenAPI spec 3.0. Default: master.

Description of the PR

This pull request updates the Dockerfiles used for the swagger-generator module to streamline the build process and keep the base images up to date. The main changes include upgrading the Red Hat UBI base image version, consolidating package installation commands, and simplifying multi-step RUN commands for efficiency and maintainability.

Base image and package installation updates:

  • Upgraded the base image from redhat/ubi9-minimal:9.6 to redhat/ubi9-minimal:9.7 in both Dockerfile and Dockerfile_root to ensure the latest security patches and features are used. [1] [2]
  • Consolidated multiple microdnf install commands into a single command in Dockerfile for improved build efficiency.

Build process simplification:

  • Combined several sequential RUN commands (such as directory creation, permission changes, and file removal) into single RUN statements in both Dockerfiles, making the Dockerfiles cleaner and reducing the number of layers in the resulting images. [1] [2]
  • Streamlined user and group creation as well as ownership changes into a single RUN command in Dockerfile for better readability and efficiency.

@kopernic-pl kopernic-pl requested a review from Copilot January 9, 2026 12:30
@kopernic-pl kopernic-pl self-assigned this Jan 9, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request updates the Dockerfiles for the swagger-generator module by upgrading the Red Hat UBI base image from version 9.6 to 9.7 and consolidating multiple RUN commands into single statements to improve build efficiency and reduce image layers.

Key changes:

  • Base image upgraded from redhat/ubi9-minimal:9.6 to redhat/ubi9-minimal:9.7
  • Multiple sequential RUN commands consolidated into single multi-line statements
  • Package installation commands merged in the main Dockerfile for better build efficiency

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
modules/swagger-generator/Dockerfile_root Upgraded base image to 9.7 and consolidated directory/permission operations into a single RUN command
modules/swagger-generator/Dockerfile Upgraded base image to 9.7, consolidated package installation commands, and merged user/group/ownership operations
Comments suppressed due to low confidence (1)

modules/swagger-generator/Dockerfile_root:5

  • The package installation commands should be consolidated into a single microdnf install statement (similar to the main Dockerfile) and include microdnf clean all at the end to reduce image size.
RUN microdnf -y install which && \
 microdnf -y install glibc-langpack-en && \
 microdnf -y install tar && \
 microdnf -y install gzip

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kopernic-pl kopernic-pl changed the title update version to 3.0.0-SNAPSHOTv3 update the base image to red hat ubi 9.7 Jan 9, 2026
daniel-kmiecik
daniel-kmiecik previously approved these changes Jan 9, 2026
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.

3 participants