aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuralamudhan Ramakrishan <kuralamudhan.ramakrishnan@intel.com>2020-03-25 19:53:22 +0000
committerKuralamudhan Ramakrishnan <kuralamudhan.ramakrishnan@intel.com>2020-03-26 07:14:36 +0000
commit342d8470b54ca175756d0216c9f5294fd69746ec (patch)
treec9252f8f129b95d519e2813b533d175036dbd799
parent4eedc027c850857e5511e6341e36fbae968f3653 (diff)
refactoring Dockerfilev0.1.0
- building with latest golang version v1.14 - Removing the dependence of CI golang version Signed-off-by: Kuralamudhan Ramakrishnan <kuralamudhan.ramakrishnan@intel.com> Change-Id: Id1ddd154a5e5cf00937ed5adbb7cd8a90d800447
-rw-r--r--build/Dockerfile28
1 files changed, 18 insertions, 10 deletions
diff --git a/build/Dockerfile b/build/Dockerfile
index 94a83aa..9530772 100644
--- a/build/Dockerfile
+++ b/build/Dockerfile
@@ -7,22 +7,30 @@ ENV http_proxy $HTTP_PROXY
ENV https_proxy $HTTPS_PROXY
ENV no_proxy $NO_PROXY
-RUN apt-get update && apt-get install -y -qq apt-transport-https curl \
- && echo "deb https://packages.wand.net.nz xenial main" > /etc/apt/sources.list.d/wand.list \
+RUN apt-get update && apt-get install -y -qq apt-transport-https make curl net-tools iproute2 \
+ && echo "deb https://packages.wand.net.nz bionic ovs-2.10" > /etc/apt/sources.list.d/ovs.list \
&& curl https://packages.wand.net.nz/keyring.gpg -o /etc/apt/trusted.gpg.d/wand.gpg \
- && apt-get update && apt install -y -qq ovn-common
+ && apt-get update && apt install -y -qq ovn-common openvswitch-common openvswitch-switch
+ENV GOLANG_VERSION 1.14.1
+RUN curl -sSL https://storage.googleapis.com/golang/go$GOLANG_VERSION.linux-amd64.tar.gz \
+ | tar -v -C /usr/local -xz
+
+ENV PATH /usr/local/go/bin:$PATH
+RUN mkdir -p /go/src /go/bin && chmod -R 777 /go
+ENV GOROOT /usr/local/go
+ENV GOPATH /go
+ENV PATH /go/bin:$PATH
+
+WORKDIR /go/src/github.com/opnfv/ovn4nfv-k8s-plugin
+COPY . .
+RUN make all
ENV OPERATOR=/usr/local/bin/nfn-operator \
AGENT=/usr/local/bin/nfn-agent \
USER_UID=1001 \
USER_NAME=nfn-operator
-# install operator binary
-COPY bin/nfn-operator ${OPERATOR}
-
-COPY bin /usr/local/bin
-
-ENTRYPOINT ["/usr/local/bin/entrypoint"]
-
+RUN cp -r build/bin/* /usr/local/bin/
+ENTRYPOINT ["entrypoint"]