Fix docker build
[multicloud/k8s.git] / deployments / Dockerfile
1 # SPDX-license-identifier: Apache-2.0
2 ##############################################################################
3 # Copyright (c) 2018
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9
10 FROM ubuntu:18.04
11
12 ARG HTTP_PROXY=${HTTP_PROXY}
13 ARG HTTPS_PROXY=${HTTPS_PROXY}
14
15 ENV http_proxy $HTTP_PROXY
16 ENV https_proxy $HTTPS_PROXY
17 ENV no_proxy $NO_PROXY
18
19 ENV CSAR_DIR "/opt/csar"
20 ENV KUBE_CONFIG_DIR "/opt/kubeconfig"
21 ENV DATABASE_TYPE "consul"
22 ENV DATABASE_IP "127.0.0.1"
23 ENV OVN_CENTRAL_ADDRESS "127.0.0.1:6641"
24
25 EXPOSE 8081
26
27 RUN groupadd -r onap && useradd -r -g onap onap
28 RUN apt-get update && apt-get install -y -qq apt-transport-https curl \
29  && echo "deb https://packages.wand.net.nz xenial main" > /etc/apt/sources.list.d/wand.list \
30  && curl https://packages.wand.net.nz/keyring.gpg -o /etc/apt/trusted.gpg.d/wand.gpg \
31  && apt-get update && apt install -y -qq ovn-common
32
33 WORKDIR /opt/multicloud/k8s
34 RUN chown onap:onap /opt/multicloud/k8s -R
35
36 ADD --chown=onap ./k8plugin ./
37 ADD --chown=onap ./*.so ./
38
39 USER onap
40
41 CMD ["./k8plugin"]