infisical
infisical copied to clipboard
optimization(docker): make resulting backend image a bit smaller
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:
Size of the image after:
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.
- [x] I have read the contributing guide, agreed and acknowledged the code of conduct. 📝