From 247412294cbd04ecbd9680646b16d08f53255caa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Wed, 8 Mar 2017 10:44:02 +0100 Subject: build-docker-otp: Avoid copying the git repository to docker daemon Since docker is run from the top-level of the otp repository, the entire repository will be the context for the docker daemon. In my private repository, more than 800Mb had to be copied before the build could be started. Let the ./scripts directory be the context for docker instead. That way, only the otp.tar.gz file needs to be copied. While we are it, also use the ADD command in the Dockerfiles to pack up the tar file and avoid copying the tar file itself to the Docker image. --- scripts/Dockerfile.64 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'scripts/Dockerfile.64') diff --git a/scripts/Dockerfile.64 b/scripts/Dockerfile.64 index c08184d10a..199067e5fe 100644 --- a/scripts/Dockerfile.64 +++ b/scripts/Dockerfile.64 @@ -1,10 +1,6 @@ FROM erlang/ubuntu-build:64bit -COPY ./otp.tar.gz /buildroot/ - -WORKDIR /buildroot/ - -RUN tar xzf otp.tar.gz +ADD ./otp.tar.gz /buildroot/ WORKDIR /buildroot/otp/ -- cgit v1.2.3