From 25e9f01fb282e356e03a83e626e4afa6806402de Mon Sep 17 00:00:00 2001 From: Jose Carlos Venegas Munoz Date: Tue, 26 Jun 2018 21:47:43 +0000 Subject: [PATCH] rootfs: docker: Reduce build time by not reinstalling go Using docker we always add (ADD) the go tarball. But we can avoid do it all the time if we install Go using RUN dockerfile instruction. Use RUN to avoid repeat steps already done in dockerfile. Fixes: #125 Signed-off-by: Jose Carlos Venegas Munoz --- rootfs-builder/rootfs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rootfs-builder/rootfs.sh b/rootfs-builder/rootfs.sh index d4530bfac3..0aa5028981 100755 --- a/rootfs-builder/rootfs.sh +++ b/rootfs-builder/rootfs.sh @@ -103,7 +103,7 @@ generate_dockerfile() [ -n "$http_proxy" ] && readonly set_proxy="RUN sed -i '$ a proxy="$http_proxy"' /etc/dnf/dnf.conf /etc/yum.conf; true" readonly install_go=" -ADD https://storage.googleapis.com/golang/go${GO_VERSION}.linux-${goarch}.tar.gz /tmp +RUN cd /tmp ; curl -OL https://storage.googleapis.com/golang/go${GO_VERSION}.linux-${goarch}.tar.gz RUN tar -C /usr/ -xzf /tmp/go${GO_VERSION}.linux-${goarch}.tar.gz ENV GOROOT=/usr/go ENV PATH=\$PATH:\$GOROOT/bin:\$GOPATH/bin