Issue
Currently, when cloning private repositories here, the command clones the entire git history of the repository and this same repository is copied to the openedx image via volumes. For final distributions, it is not necessary to have the entire git history of the repository, which currently increases build time and the final size of the image.
Proposal
Add the argument --depth 1 to the Git clone command so that a shallow copy of the repository is cloned instead of the entire Git history. In case of the eox-core repository, doing so saves nearly 50% of disk space, decreasing the build time and image size when cloning several packages this way.
Without --depth 1
2.5M ./eox-core/.git
3.8M ./eox-core
With --depth 1
400K ./eox-core/.git
1.7M ./eox-core
Thanks in advance and let me know what you think.
Issue
Currently, when cloning private repositories here, the command clones the entire git history of the repository and this same repository is copied to the openedx image via volumes. For final distributions, it is not necessary to have the entire git history of the repository, which currently increases build time and the final size of the image.
Proposal
Add the argument
--depth 1to the Git clone command so that a shallow copy of the repository is cloned instead of the entire Git history. In case of the eox-core repository, doing so saves nearly 50% of disk space, decreasing the build time and image size when cloning several packages this way.Thanks in advance and let me know what you think.