mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-30 17:22:33 +00:00
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 <jose.carlos.venegas.munoz@intel.com>
This commit is contained in:
parent
b9b9410b83
commit
25e9f01fb2
@ -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"
|
[ -n "$http_proxy" ] && readonly set_proxy="RUN sed -i '$ a proxy="$http_proxy"' /etc/dnf/dnf.conf /etc/yum.conf; true"
|
||||||
|
|
||||||
readonly install_go="
|
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
|
RUN tar -C /usr/ -xzf /tmp/go${GO_VERSION}.linux-${goarch}.tar.gz
|
||||||
ENV GOROOT=/usr/go
|
ENV GOROOT=/usr/go
|
||||||
ENV PATH=\$PATH:\$GOROOT/bin:\$GOPATH/bin
|
ENV PATH=\$PATH:\$GOROOT/bin:\$GOPATH/bin
|
||||||
|
Loading…
Reference in New Issue
Block a user