From cda4927a8567add6801a72c83fb156b54397865e Mon Sep 17 00:00:00 2001 From: lilyus Date: Tue, 13 Mar 2018 11:25:31 +0100 Subject: [PATCH] Reduce image size (Dev Branch) Hello, Because we don't need to pull all the git repository, we should use --depth=1 (https://www.git-scm.com/docs/git-clone#git-clone---depthltdepthgt). This is reducing image size and improving build speed. Regards --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f6ef561..ce84ddf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -52,7 +52,7 @@ RUN apt-get -qy clean \ # build empire from source # TODO: When we merge to master set branch to master -RUN git clone -b dev https://github.com/EmpireProject/Empire.git /opt/Empire && \ +RUN git clone --depth=1 -b dev https://github.com/EmpireProject/Empire.git /opt/Empire && \ cd /opt/Empire/setup/ && \ ./install.sh && \ rm -rf /opt/Empire/data/empire*