Skip to content

Update Dockerfile to use multi-stages to reduce build time and image size #522

@sanG-github

Description

@sanG-github

Why

As we have already done researching the usage and already applied changes to our Dockerfile to compare the pros/cons, please take a look at this comparison file for more detailed.

There are two proposed works (POC) that you can take a look at as a reference.

Here is the visualization of the changes in the multi-stage diagram, which shows the parallel steps that can be made to reduce build time, and some copy steps to reduce the image size, we keep only the needed dependencies for the next steps 💡

image

✅ Acceptance Criteria:

  • multi-state building 👍 -> is about improving the build-time and image size 🤩
  • layer caching to GitHub action 👍 -> reduce CI/CD time
  • eliminating unused dependencies
  • verifying docker image (mainly about compiling assets)

Who Benefits?

Client projects with reduced image size and build time, less costs 🚀

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions