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

Optimize Dockerfile to reduce image size and improve build efficiency #1048

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

PeterDaveHello
Copy link
Contributor

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

    Optimization of Dockerfile to reduce image size and improve build efficiency.

  • Why was this change needed? (You can also link to an open issue here)

    This change aims to reduce Docker image size and enhance build efficiency. By merging apt-related RUN commands, we consolidate cleanup operations within the same layer, effectively reducing image size. Additionally, we removed the redundant apt-get clean command, as this operation is automatically handled in the Ubuntu base image.

  • Other information:

    The reason why to remove apt-get clean is based on Docker's official best practices guide. More details can be found at:

    These changes not only reduce image size but also improve the efficiency of the build process, positively impacting continuous integration and deployment workflows.

- Merge apt-related RUN commands in builder and final stages
- Remove redundant apt-get clean (automatically handled by base image)
- Consolidate cleanup operations within the same layer for effective
  size reduction

Reference:
- https://docs.docker.com/build/building/best-practices/#apt-get
Copy link

vercel bot commented Aug 1, 2024

@PeterDaveHello is attempting to deploy a commit to the Arc53 Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

@dartpain dartpain left a comment

Choose a reason for hiding this comment

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

Thank you!

@dartpain dartpain merged commit f57116a into arc53:main Aug 1, 2024
6 of 7 checks passed
@PeterDaveHello PeterDaveHello deleted the Dockerfile branch August 2, 2024 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
application Application
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants