Skip to content

Reduce the size of private repositories during cloning. #13

Description

@Squirrel18

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions