infisical icon indicating copy to clipboard operation
infisical copied to clipboard

optimization(docker): make resulting backend image a bit smaller

Open GLEF1X opened this issue 1 year ago • 0 comments

Description 📣

This optimization reduces the backend Docker image size by eliminating redundant steps in the production stage. By removing the duplicate package*.json copy and npm ci commands, the build process is streamlined to rely solely on artifacts from the build stage. The result is a leaner final image, potentially improving deployment speed and resource efficiency in production environments.

Size of the image before:

CleanShot 2024-07-31 at 01 12 22@2x

Size of the image after:

CleanShot 2024-07-31 at 01 15 17@2x

Type ✨

  • [ ] Bug fix
  • [ ] New feature
  • [ ] Breaking change
  • [ ] Documentation
  • [x] Optimization

Tests 🛠️

I tested containers using the new image and confirmed they function correctly without any regressions or issues. The optimized build maintains expected functionality while reducing image size.


GLEF1X avatar Jul 31 '24 13:07 GLEF1X