-
Notifications
You must be signed in to change notification settings - Fork 3
Optimize the size of docker images and fix utf8.Dockerfile #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 PR optimizes Docker images by migrating from standard almalinux:9 to the smaller almalinux:9-minimal base image and switching from dnf to microdnf package manager. It also fixes a critical issue in utf8.Dockerfile where the installation prefix was set to /tmp/usr/ but files were copied from /usr/, causing cobj to not work in older images. Additionally, the PR enhances CI validation with image size reporting and basic container functionality tests.
Key changes:
- Migrated both Dockerfiles to use minimal AlmaLinux base images with
microdnffor reduced image size - Fixed
utf8.Dockerfileinstallation path from/tmp/usr/to/usr/and converted wildcard COPY to explicit file copies - Added CI steps to display Docker image sizes and run basic container tests validating COBOL compilation and execution
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| utf8.Dockerfile | Migrated to minimal base image, fixed installation prefix bug, added explicit COPY commands for runtime files, and added missing build dependencies |
| Dockerfile | Migrated to minimal base image with microdnf package manager and updated cache cleanup path |
| .github/workflows/ci.yml | Added Docker image size reporting and basic container functionality tests for both standard and UTF-8 builds |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This pull request updates the Docker build and CI process to use smaller, minimal images and improves testing and validation steps in the CI workflow. The changes aim to reduce image size, streamline dependencies, and add automated container tests.
Docker image optimization and dependency changes:
Dockerfileandutf8.Dockerfilefromalmalinux:9toalmalinux:9-minimal, and replaceddnfwithmicrodnffor installing dependencies, resulting in smaller, more efficient images. Also, added missing build dependencies (tar,gzip). [1] [2] [3]microdnfand remove the correct cache directory. [1] [2]Build and installation path adjustments:
/tmp/usr/to/usr/and updated theCOPYinstructions to explicitly copy only required binaries and libraries, making the runtime image cleaner and more predictable.cobjin older Docker images does not work correctly!Continuous Integration workflow improvements:
.github/workflows/ci.ymlto display the Docker image size after building both standard and UTF-8 images, providing visibility into image optimization. [1] [2]