Closed Naresh-chandanbatve closed 1 year ago
To reduce notifications, issues are locked until they are https://github.com/EddieHubCommunity/LinkFree/labels/%F0%9F%8F%81%20status%3A%20ready%20for%20dev and to be assigned. You can learn more in our contributing guide https://github.com/EddieHubCommunity/LinkFree/blob/main/CONTRIBUTING.md
This is interesting because, technically, it's not an effective multistage build. In a multistage build, we usually build the executable and copy it to a different step just to run it without needing all the app files. However, the changes you proposed involve copying the whole app after running npm i
and running it on a lighter version of Node. The same result can be achieved by simply changing the base to a lighter version of Node.
Yes, the app is bigger, but I am not keen on running it on a lighter version of (Alpine) as this is a full-stack app that uses Next.js. There are lots of weird behaviours that can happen with Alpine.
Thanks for raising. Closing this issue.
What would you like to share?
Currently the Dockerfiles are using normal single stage concept and I have checked the current size of linkfree image is around 2 gb we can reduce the docker image size by applying multistage dockerfile concept and only copy essential files to the final stage. which will make easy for other developers to pull the image more efficiently.
multistage Dockerfile looks something like this.
It will be great if you provide some information on file changing like what is the use of Dockerfile.dev and should I change both files or only main Dockerfile.
If it is ready for dev I would like to work on this.
Additional information
No response