From e0aeb488a4ab9d6a1ecafd8011f7c31a9a444ff2 Mon Sep 17 00:00:00 2001 From: Jerry Sun Date: Thu, 15 Nov 2018 14:20:25 -0500 Subject: [PATCH] Add dep for golang in the build container We would like to have dep for golang as part of the build to pull in dependencies. This allows us to avoid checking in dependency package in our code base and to pull in the dependencies when building. Story:2002840 Change-Id: Ifff8dab38aebdc5638909679b7bef8128c6a84a7 Signed-off-by: Jerry Sun --- Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Dockerfile b/Dockerfile index a595e10c..87ef00b8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -230,5 +230,10 @@ COPY centos-mirror-tools/rpm-gpg-keys/* /etc/pki/rpm-gpg/ # Import GPG keys RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY* +# installing go and setting paths +ENV GOPATH="/usr/local/go" +ENV PATH="${GOPATH}/bin:${PATH}" +RUN yum install -y golang; mkdir -p ${GOPATH}/bin; curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh + # Don't know if it's possible to run services without starting this CMD /usr/sbin/init