blob: 7ad66d309e49b9a559a3525254568162b4e0964f [file] [log] [blame]
Sylvain Desbureaux1bc56902019-01-30 14:36:14 +01001FROM alpine:3.8
2
3LABEL maintainer="SDN-C Team (sdnc@lists.openecomp.org)"
4ARG PIP_TAG=18.0
5
6WORKDIR /opt/
7
8COPY ansible-server/requirements.txt ansible-server/requirements.txt
9
Taka Cho9bec8482019-02-18 14:31:27 -050010RUN apk add --no-cache curl \
11 bash \
12 py2-pip \
Sylvain Desbureaux1bc56902019-01-30 14:36:14 +010013 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
Timoney, Dan (dt5972)38e175f2019-02-21 14:57:34 -050022RUN addgroup -S ansible && adduser -S ansible -G ansible
23COPY --chown=ansible:ansible ansible-server ansible-server
24COPY --chown=ansible:ansible configuration/ansible.cfg /etc/ansible/ansible.cfg
25
Sylvain Desbureaux1bc56902019-01-30 14:36:14 +010026
27WORKDIR /opt/ansible-server
28
Timoney, Dan (dt5972)15f406b2019-02-06 17:14:45 -050029RUN mkdir /opt/onap ; ln -s /opt/ansible-server /opt/onap/ccsdk
Timoney, Dan (dt5972)38e175f2019-02-21 14:57:34 -050030RUN echo > /var/log/ansible-server.log
31RUN chown ansible:ansible /var/log/ansible-server.log
32
33USER ansible:ansible
34
Timoney, Dan (dt5972)15f406b2019-02-06 17:14:45 -050035
Sylvain Desbureaux1bc56902019-01-30 14:36:14 +010036EXPOSE 8000
37
Taka Cho9bec8482019-02-18 14:31:27 -050038##ENTRYPOINT ["python2", "RestServer.py"]