Support submodules when building from a gh repo#3463
Conversation
|
LGTM /cc @vieux |
|
oooo. this might be useful in one project I work on - needs documentation though :) on second thoughts, it might need to be made optional. iirc, there are hundreds of submodules, and some are pretty massive |
|
Hmm.. A flag for |
|
@songgao I would suspect so, though I'm not thrilled about it (something long like --clone-git-recursive :/ ) |
|
Are there use cases where this wouldn't be the expected behavior with regards to git sub-modules? |
|
@tianon i suspect so - in one submodule project I worked with, there was a core repo, with hundreds of submodules, resulting in several GB worth of data. If I were to dockerise that project, the submodules would all go into separate volume containers (as most of them were data). Mind you, I can't recal if more than the core module would be needed to bootstrap the app-server container. I'm trying to avoid judging the goodness of such an approach, but cloning, and then uploading several GB's to only use the core module would probably annoy the heck out of the docker user. |
|
In that case though, are you going to be just passing Docker the GitHub URL and hoping for the best? Or are you going to clone locally and do the |
|
Hmm.. that's a good point. So |
|
or the safest case? (I don't know enough git usage, so I can't say which way is best). My reading has only seen the (loudly) talked about cases where submodules are used because there's way too much stuff to have in one repo - which is what makes me wary of defaulting to I seriously don't have the massive scale git experience to know tho. |
|
I honestly see |
|
fair cop guv :) |
|
ping @shykes - what're your thoughts on this? |
|
As a packages, service or extensions provider / software vendor , As a developer for a company-wide software solution, I need to control carefully the project's building. The GIT_URL thing is not that useful (my ecosystem will be more complex for sure). The
|
|
@songgao are you interested in getting this merged? I needs the new DCO - https://github.com/dotcloud/docker/blob/master/CONTRIBUTING.md#sign-your-work Each commit in your PR must be signed in the following format: also, can you add a little documentation to the cli.rst please? |
|
@GermanDZ that's also a good point - Might be good to create a new issue for it though - or even better mention it in the docker-dev list - there might be some discussion wrt syntax :) |
|
@SvenDowideit Thanks for the link! I've added sign-off (and also a GPG signature) and some documentation about recursively cloning in cli.rst.
|
|
@songgao Can you rebase this on master, please? |
|
It seems |
|
@songgao Can you fix the DCO on your commit, please? |
Docker-DCO-1.1-Signed-off-by: Song Gao <[email protected]> (github: songgao)
|
@unclejack Thanks for the catch! I've also rebased it to current master. |
|
LGTM |
Support submodules when building from a gh repo
Hey, I was thinking if automatically cloning a repo is supported, submodules should be included if existed.
Dockerfilemight be using some files in submodule(s) in that repo.