Open ghorbani-ali opened 4 months ago
@ghorbani-ali please merge from main branch
@ghorbani-ali please merge from main branch
Hi @KrzysztofPajak I’m sorry, I don’t understand. Could you tell me more?
@ghorbani-ali you have conflicts, please resolve it
@ghorbani-ali you have conflicts, please resolve it
Conflicts have been resolved.
During my investigations, I realized that exactly after my changes, similar changes were made, apparently from your team. What was strange to me was that the changes were exactly the same as mine, with a slight difference in the name and type of implementation. Thank you for explaining the reason for this.
@ghorbani-ali Have you tried running the GrandNode image with 8.0-alpine ?
@ghorbani-ali Have you tried running the GrandNode image with 8.0-alpine ?
Yes. but only in the build stage, not in runtime stage. Is there any problem?
@KrzysztofPajak After your reply, I tried to test the project with an Alpine runtime image. There was no problem. I added a new commit with these changes.
Type: feature
Issue
We can use alpine base images to have secure and lightweight images. This Dockerfile has many commands to build modules statically, and this increases image layers unnecessarily. There is no need to use the restore command explicitly because it runs implicitly when using the build command.
Solution
Replace SDK base image with alpine to lightweight build stage image. Use dynamic package build for simplicity and decrease docker image layers. Remove unnecessary restore commands. According to the official documentation, it is mentioned that this command is executed implicitly by the build command. Remove duplicates in directory creation.
Testing
By running this command, the image builds cleanly without using cache and shows all the debug information about what is happening.
docker build --no-cache --progress=plain -t grandnode2:latest .