adding gwipaddress features in network annotation
[ovn4nfv-k8s-plugin.git] / build / Dockerfile.ubuntu
1 FROM ubuntu:18.04
2
3 ARG HTTP_PROXY=${HTTP_PROXY}
4 ARG HTTPS_PROXY=${HTTPS_PROXY}
5
6 ENV http_proxy $HTTP_PROXY
7 ENV https_proxy $HTTPS_PROXY
8 ENV no_proxy $NO_PROXY
9
10 RUN apt-get update && apt-get install -y -qq apt-transport-https make curl net-tools iproute2 iptables \
11     wget software-properties-common setpriv dpkg-dev netcat jq
12
13 RUN mkdir -p /opt/ovn4nfv-k8s-plugin/dist/ubuntu/deb
14 RUN bash -xc "\
15 pushd /opt/ovn4nfv-k8s-plugin/dist/ubuntu/deb; \
16 wget -q -nv -O- https://api.github.com/repos/akraino-icn/ovs/releases/tags/v2.12.0 2>/dev/null | jq -r '.assets[] | select(.browser_download_url | contains("\""deb"\"")) | .browser_download_url' | wget -i -; \
17 dpkg-scanpackages . | gzip -c9  > Packages.gz; \
18 popd; \
19 "
20 RUN echo "deb [trusted=yes] file:///opt/ovn4nfv-k8s-plugin/dist/ubuntu/deb ./" | tee -a /etc/apt/sources.list > /dev/null
21 RUN apt-get update && apt-get install -y -qq ovn-common=2.12.0-1 openvswitch-common=2.12.0-1 openvswitch-switch=2.12.0-1
22
23 ENV GOLANG_VERSION 1.14.1
24 RUN curl -sSL https://storage.googleapis.com/golang/go$GOLANG_VERSION.linux-amd64.tar.gz \
25         | tar -v -C /usr/local -xz
26
27 ENV PATH /usr/local/go/bin:$PATH
28 RUN mkdir -p /go/src /go/bin && chmod -R 777 /go
29 ENV GOROOT /usr/local/go
30 ENV GOPATH /go
31 ENV PATH /go/bin:$PATH
32
33 WORKDIR /go/src/github.com/opnfv/ovn4nfv-k8s-plugin
34 COPY . .
35 RUN make all
36
37 ENV OPERATOR=/usr/local/bin/nfn-operator \
38     AGENT=/usr/local/bin/nfn-agent \
39     USER_UID=1001 \
40     USER_NAME=nfn-operator
41
42 RUN cp -r build/bin/* /usr/local/bin/
43 ENTRYPOINT ["entrypoint"]