Add sdnr wt repository to odlsli
[ccsdk/distribution.git] / ansible-server / src / main / Dockerfile
1 FROM alpine:3.8
2
3 LABEL maintainer="SDN-C Team (sdnc@lists.openecomp.org)"
4 ARG PIP_TAG=18.0
5
6 WORKDIR /opt/
7
8 COPY ansible-server/requirements.txt ansible-server/requirements.txt
9
10 RUN apk add --no-cache curl \
11                        bash \
12                        py2-pip \
13                        openssh-client \
14                        python2 &&\
15     apk add --no-cache --virtual .build-deps build-base \
16                                              libffi-dev \
17                                              openssl-dev \
18                                              python2-dev &&\
19     pip install --no-cache-dir --upgrade pip==$PIP_TAG && \
20     pip install --no-cache-dir -r ansible-server/requirements.txt &&\
21     apk del .build-deps
22
23 RUN addgroup -S ansible && adduser -S ansible -G ansible
24 COPY --chown=ansible:ansible ansible-server ansible-server
25 COPY --chown=ansible:ansible configuration/ansible.cfg /etc/ansible/ansible.cfg
26
27
28 WORKDIR /opt/ansible-server
29
30 RUN mkdir /opt/onap ; ln -s /opt/ansible-server /opt/onap/ccsdk
31 RUN echo > /var/log/ansible-server.log
32 RUN chown ansible:ansible /var/log/ansible-server.log
33 RUN chown ansible:ansible /opt/ansible-server
34
35 USER ansible:ansible
36
37
38 EXPOSE 8000
39
40 ##ENTRYPOINT ["python2", "RestServer.py"]