-
Notifications
You must be signed in to change notification settings - Fork 74
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
Dockerfile Upgrades and Optimizations #313
Conversation
- Removed `apk upgrade` to prevent privilege issues and ensure stable builds. - Used `apk add --no-cache` for smaller and faster builds. - Replaced `RUN mkdir` with `WORKDIR` for directory creation. Signed-off-by: Khalid <[email protected]>
- Upgrade Wireshark version from 3.4.9 to 4.4.1 - Use Ubuntu 24.04 as the base image in all stages - Standardize downloads by replacing wget with curl for consistency - Streamline package installation and cleanup steps to reduce image size Signed-off-by: Khalid <[email protected]>
- Replace 'apt' with 'apt-get' for consistent package management - Remove 'apt upgrade' to streamline the build process - Add '--no-install-recommends' to 'apt-get install' to avoid unnecessary packages - Clean up apt cache with 'rm -rf /var/lib/apt/lists/*' to reduce image size - Simplify build commands by adjusting WORKDIR paths and commands - Capitalize 'AS' in 'FROM' statements for Dockerfile syntax consistency Signed-off-by: Khalid <[email protected]>
- Updated base images to `alpine:3.20.3`. - Removed `apk update && apk upgrade` to streamline build process. - Added `--no-cache` to `apk add` commands. - Simplified directory handling with `WORKDIR` in build stages. Signed-off-by: Khalid <[email protected]>
- Updated base images to ubuntu:24.04. - Replaced apt with apt-get for improved reliability and added --no-install-recommends to reduce image size. - Added WORKDIR commands to simplify directory handling in build stages. - Cleaned up apt cache to streamline the build process. Signed-off-by: Khalid <[email protected]>
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.
These changes look good to me—thanks very much for the contribution—but I imagine that you and @ajbozarth will want to coordinate to ensure a smooth merge.
On an initial read through the @BusyKhalid just curious how did you test these updates and in what environments? |
Thanks for the feedback. I’ve closed this PR for now as I plan to make further changes and address a few mistakes I overlooked. I totally agree about coordinating with @ajbozarth. |
I appreciate the insights.
I tested locally on Windows 11. Closing for now to make some refinements before resubmitting. |
Please feel free to mark as draft rather than closing if you intend to reopen it later. |
This pull request introduces multiple updates to improve build efficiency, reduce image size, and increase the stability of the Dockerfiles. Key changes include:
Base Image Upgrades:
Ubuntu 24.04
andAlpine 3.20.3
.4.4.1
.Optimizations in Dockerfile Build Stages:
apt
withapt-get
and added--no-install-recommends
to minimize unnecessary packages in Ubuntu-based images.apk
commands with--no-cache
and removedapk upgrade
in Alpine-based images to reduce image size and improve stability.curl
overwget
for consistency.Efficiency Improvements:
WORKDIR
instead of multipleRUN mkdir
commands.apt
andapk
cache to reduce final image sizes.