Skip to content
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

Closed
wants to merge 5 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Nov 1, 2024

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:

    • Upgraded to Ubuntu 24.04 and Alpine 3.20.3.
    • Updated Wireshark to version 4.4.1.
  • Optimizations in Dockerfile Build Stages:

    • Replaced apt with apt-get and added --no-install-recommends to minimize unnecessary packages in Ubuntu-based images.
    • Simplified apk commands with --no-cache and removed apk upgrade in Alpine-based images to reduce image size and improve stability.
    • Standardized download commands to use curl over wget for consistency.
  • Efficiency Improvements:

    • Streamlined directory handling using WORKDIR instead of multiple RUN mkdir commands.
    • Cleaned up apt and apk cache to reduce final image sizes.

Khalid added 5 commits November 1, 2024 17:00
- 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]>
Copy link
Member

@SWilson4 SWilson4 left a 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.

@ajbozarth
Copy link
Member

On an initial read through the curl openssl3 and openvpn updates should merge with #298 with just a handful of minor conflicts caused by my addition of ENV vars for pinning versions. As for the wireshark update, I'll try it out later, but if I'm reading it correctly all the changes are generally cosmetic, and would not invalidate deprecating in in #298

@BusyKhalid just curious how did you test these updates and in what environments?

@ghost ghost closed this Nov 1, 2024
@ghost ghost reopened this Nov 1, 2024
@ghost
Copy link
Author

ghost commented Nov 1, 2024

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.

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.

@ghost
Copy link
Author

ghost commented Nov 1, 2024

On an initial read through the curl openssl3 and openvpn updates should merge with #298 with just a handful of minor conflicts caused by my addition of ENV vars for pinning versions. As for the wireshark update, I'll try it out later, but if I'm reading it correctly all the changes are generally cosmetic, and would not invalidate deprecating in in #298

I appreciate the insights.

@BusyKhalid just curious how did you test these updates and in what environments?

I tested locally on Windows 11. Closing for now to make some refinements before resubmitting.

@SWilson4
Copy link
Member

SWilson4 commented Nov 1, 2024

Please feel free to mark as draft rather than closing if you intend to reopen it later.

@ghost ghost closed this Nov 1, 2024
This pull request was closed.
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