7ad66d309e49b9a559a3525254568162b4e0964f
[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                        python2 &&\
14     apk add --no-cache --virtual .build-deps build-base \
15                                              libffi-dev \
16                                              openssl-dev \
17                                              python2-dev &&\
18     pip install --no-cache-dir --upgrade pip==$PIP_TAG && \
19     pip install --no-cache-dir -r ansible-server/requirements.txt &&\
20     apk del .build-deps
21
22 RUN addgroup -S ansible && adduser -S ansible -G ansible
23 COPY --chown=ansible:ansible ansible-server ansible-server
24 COPY --chown=ansible:ansible configuration/ansible.cfg /etc/ansible/ansible.cfg
25
26
27 WORKDIR /opt/ansible-server
28
29 RUN mkdir /opt/onap ; ln -s /opt/ansible-server /opt/onap/ccsdk
30 RUN echo > /var/log/ansible-server.log
31 RUN chown ansible:ansible /var/log/ansible-server.log
32
33 USER ansible:ansible
34
35
36 EXPOSE 8000
37
38 ##ENTRYPOINT ["python2", "RestServer.py"]

© 2017 ONAP. Copyright © The Linux Foundation ®. All Rights Reserved.
The Linux Foundation has registered trademarks and uses trademarks.
For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.
Linux is a registered trademark of Linus Torvalds.
Privacy Policy and Terms of Use