fix odl patches
[ccsdk/distribution.git] / ansible-server / src / main / Dockerfile
1 FROM onap/integration-python:7.0.1
2
3 LABEL maintainer="SDN-C Team (sdnc@lists.openecomp.org)"
4 ARG PIP_TAG=18.0
5
6 WORKDIR /opt/
7
8 ENV http_proxy ${http_proxy}
9 ENV https_proxy ${https_proxy}
10 ENV PIP_EXTRA_OPTS ${https_proxy:+"--trusted-host pypi.org --trusted-host files.pythonhosted.org --proxy=${https_proxy}"}
11 ENV PIP_EXTRA_OPTS ${PIP_EXTRA_OPTS:-""}
12
13 USER root
14 COPY ansible-server/requirements.txt ansible-server/requirements.txt
15
16 RUN echo "https_proxy is ${https_proxy} ; PIP_EXTRA_OPTS is ${PIP_EXTRA_OPTS}"
17
18 RUN apk add --no-cache curl \
19                        iputils \
20                        bash \
21                        openssh-client &&\
22     apk add --no-cache --virtual .build-deps build-base \
23                                              libffi-dev \
24                                              openssl-dev \
25                                              python3-dev &&\
26     pip3 install --no-cache-dir --upgrade pip ${PIP_EXTRA_OPTS} && \
27     pip3 install --no-cache-dir -r ansible-server/requirements.txt ${PIP_EXTRA_OPTS} &&\
28     apk del .build-deps
29
30 RUN addgroup -S ansible && adduser -S ansible -G ansible
31
32 COPY --chown=ansible:ansible ansible-server ansible-server
33 COPY --chown=ansible:ansible configuration/ansible.cfg /etc/ansible/ansible.cfg
34
35 WORKDIR /opt/ansible-server
36
37 RUN mkdir /opt/onap ; ln -s /opt/ansible-server /opt/onap/ccsdk
38 RUN echo > /var/log/ansible-server.log
39 RUN chown -R ansible:ansible /var/log
40 RUN chown ansible:ansible /opt/ansible-server
41
42 USER ansible:ansible
43
44
45 EXPOSE 8000
46
47 ##ENTRYPOINT ["python2", "RestServer.py"]