diff options
| author | Zhou Zheng Sheng <zhengsheng@awcloud.com> | 2015-08-24 13:11:11 +0800 |
|---|---|---|
| committer | Zhou Zheng Sheng <zhengsheng@awcloud.com> | 2015-08-25 22:55:40 -0500 |
| commit | 32d48e6fb78910a39472e46ca1ff729dfe0e8530 (patch) | |
| tree | 9088acb2804669eb201092cf875d4d54dffb18d1 | |
| parent | 93d709e6345b0e57cd1fe1090af511e50d9d6f5f (diff) | |
| download | kolla-32d48e6fb78910a39472e46ca1ff729dfe0e8530.tar.gz kolla-32d48e6fb78910a39472e46ca1ff729dfe0e8530.zip | |
Speedup Git Cloning Ansible Repository
When building kolla-ansible image, it clones ansible source code from
github. Since we just need the source code but not the commit history,
there is no need to download all the commit log objects. This patch adds
"--depth 1" option to git clone command. This will speedup kolla-ansible
image building a lot, especially in countries with slow Internet access.
Change-Id: I834f83a127350415a5861a2f5b2982df3d3e3f5a
Closes-Bug: #1488744
| -rw-r--r-- | docker/centos/binary/kolla-ansible/Dockerfile | 2 | ||||
| -rw-r--r-- | docker_templates/kolla-ansible/Dockerfile.j2 | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/docker/centos/binary/kolla-ansible/Dockerfile b/docker/centos/binary/kolla-ansible/Dockerfile index 9368eb786..dab386109 100644 --- a/docker/centos/binary/kolla-ansible/Dockerfile +++ b/docker/centos/binary/kolla-ansible/Dockerfile @@ -16,7 +16,7 @@ RUN yum -y install \ RUN pip install -U pip wheel \ && pip install python-openstackclient shade -RUN git clone https://github.com/ansible/ansible.git \ +RUN git clone --depth 1 https://github.com/ansible/ansible.git \ && cd ansible \ && git submodule update --init --recursive \ && pip install . diff --git a/docker_templates/kolla-ansible/Dockerfile.j2 b/docker_templates/kolla-ansible/Dockerfile.j2 index 547694719..e95a90aa7 100644 --- a/docker_templates/kolla-ansible/Dockerfile.j2 +++ b/docker_templates/kolla-ansible/Dockerfile.j2 @@ -25,7 +25,7 @@ RUN apt-get install -y --no-install-recommends git RUN pip install shade -RUN git clone https://github.com/ansible/ansible.git \ +RUN git clone --depth 1 https://github.com/ansible/ansible.git \ && cd ansible \ && git submodule update --init --recursive \ && pip install --install-option="--install-scripts=/usr/bin" . |
