Update vfc dockerfile
[vfc/nfvo/lcm.git] / docker / Dockerfile
1 FROM ubuntu:14.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
9 RUN echo "mysql-server mysql-server/root_password password root" | debconf-set-selections
10 RUN echo "mysql-server mysql-server/root_password_again password root" | debconf-set-selections
11
12 RUN apt-get update && \
13     apt-get install -y python-virtualenv && \
14     apt-get install -y python-setuptools && \
15     apt-get install -y python-dev && \
16     apt-get install -y python-pip && \
17     apt-get install -y gcc && \
18     apt-get install -y libmysqlclient-dev && \
19     apt-get install -y redis-server && \
20     apt-get install -y mysql-server && \
21     apt-get install -y mysql-client && \
22     apt-get install -y wget && \
23     apt-get install -y unzip && \
24     apt-get install -y curl && \
25     apt-get install -y build-essential && \
26     apt-get install -y libssl-dev && \
27     apt-get install -y libffi-dev
28
29 RUN pip install --upgrade pip
30 RUN pip install --upgrade setuptools
31
32 ADD . /service
33 WORKDIR /service
34
35 # get binary zip from nexus - vfc-nfvo-lcm
36 RUN wget -q -O vfc-nfvo-lcm.zip 'https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.vfc.nfvo.lcm&a=vfc-nfvo-lcm&v=LATEST&e=zip' && \
37     unzip vfc-nfvo-lcm.zip && \
38     rm -rf vfc-nfvo-lcm.zip
39
40 RUN sed -i "s|bind-address.*|# bind-address = 127.0.0.1|" /etc/mysql/my.cnf
41
42 VOLUME /var/lib/mysql
43
44 WORKDIR /service/vfc/nfvo/lcm
45 RUN pip install --pre -r requirements.txt
46
47 EXPOSE 8403
48 EXPOSE 3306
49 EXPOSE 6379
50
51 WORKDIR /service
52 ENTRYPOINT vfc/nfvo/lcm/docker/docker-entrypoint.sh