blob: d44f5c39d3b811d2ff1eca486f25e0fc6a00fdc0 [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 Desbureaux78327d72019-03-05 17:40:10 +010013 openssh-client \
Sylvain Desbureaux1bc56902019-01-30 14:36:14 +010014 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
Timoney, Dan (dt5972)38e175f2019-02-21 14:57:34 -050023RUN addgroup -S ansible && adduser -S ansible -G ansible
24COPY --chown=ansible:ansible ansible-server ansible-server
25COPY --chown=ansible:ansible configuration/ansible.cfg /etc/ansible/ansible.cfg
26
Sylvain Desbureaux1bc56902019-01-30 14:36:14 +010027
28WORKDIR /opt/ansible-server
29
Timoney, Dan (dt5972)15f406b2019-02-06 17:14:45 -050030RUN mkdir /opt/onap ; ln -s /opt/ansible-server /opt/onap/ccsdk
Timoney, Dan (dt5972)38e175f2019-02-21 14:57:34 -050031RUN echo > /var/log/ansible-server.log
Taka Choc6e85bc2019-04-22 11:54:32 -040032RUN chown -R ansible:ansible /var/log
Sylvain Desbureaux78327d72019-03-05 17:40:10 +010033RUN chown ansible:ansible /opt/ansible-server
Timoney, Dan (dt5972)38e175f2019-02-21 14:57:34 -050034
35USER ansible:ansible
36
Timoney, Dan (dt5972)15f406b2019-02-06 17:14:45 -050037
Sylvain Desbureaux1bc56902019-01-30 14:36:14 +010038EXPOSE 8000
39
Taka Cho9bec8482019-02-18 14:31:27 -050040##ENTRYPOINT ["python2", "RestServer.py"]