blob: 9536a64632640cf202a85c3f6649378eb871b766 [file] [log] [blame]
Dan Timoney0b9839e2020-09-01 16:21:53 -04001FROM onap/integration-python:7.0.1
Sylvain Desbureaux1bc56902019-01-30 14:36:14 +01002
3LABEL maintainer="SDN-C Team (sdnc@lists.openecomp.org)"
4ARG PIP_TAG=18.0
5
6WORKDIR /opt/
7
Dan Timoney0b9839e2020-09-01 16:21:53 -04008ENV http_proxy ${http_proxy}
9ENV https_proxy ${https_proxy}
10ENV PIP_EXTRA_OPTS ${https_proxy:+"--trusted-host pypi.org --trusted-host files.pythonhosted.org --proxy=${https_proxy}"}
11ENV PIP_EXTRA_OPTS ${PIP_EXTRA_OPTS:-""}
12
13USER root
Sylvain Desbureaux1bc56902019-01-30 14:36:14 +010014COPY ansible-server/requirements.txt ansible-server/requirements.txt
15
Dan Timoney0b9839e2020-09-01 16:21:53 -040016RUN echo "https_proxy is ${https_proxy} ; PIP_EXTRA_OPTS is ${PIP_EXTRA_OPTS}"
17
Taka Cho9bec8482019-02-18 14:31:27 -050018RUN apk add --no-cache curl \
Taka Choef127a52019-11-01 15:52:15 -040019 iputils \
Taka Cho9bec8482019-02-18 14:31:27 -050020 bash \
Dan Timoney0b9839e2020-09-01 16:21:53 -040021 openssh-client &&\
Sylvain Desbureaux1bc56902019-01-30 14:36:14 +010022 apk add --no-cache --virtual .build-deps build-base \
23 libffi-dev \
24 openssl-dev \
Taka Choef127a52019-11-01 15:52:15 -040025 python3-dev &&\
Dan Timoney0b9839e2020-09-01 16:21:53 -040026 pip3 install --no-cache-dir --upgrade pip ${PIP_EXTRA_OPTS} && \
27 pip3 install --no-cache-dir -r ansible-server/requirements.txt ${PIP_EXTRA_OPTS} &&\
Sylvain Desbureaux1bc56902019-01-30 14:36:14 +010028 apk del .build-deps
29
Timoney, Dan (dt5972)38e175f2019-02-21 14:57:34 -050030RUN addgroup -S ansible && adduser -S ansible -G ansible
Taka Choef127a52019-11-01 15:52:15 -040031
Timoney, Dan (dt5972)38e175f2019-02-21 14:57:34 -050032COPY --chown=ansible:ansible ansible-server ansible-server
33COPY --chown=ansible:ansible configuration/ansible.cfg /etc/ansible/ansible.cfg
34
Sylvain Desbureaux1bc56902019-01-30 14:36:14 +010035WORKDIR /opt/ansible-server
36
Timoney, Dan (dt5972)15f406b2019-02-06 17:14:45 -050037RUN mkdir /opt/onap ; ln -s /opt/ansible-server /opt/onap/ccsdk
Timoney, Dan (dt5972)38e175f2019-02-21 14:57:34 -050038RUN echo > /var/log/ansible-server.log
Taka Choc6e85bc2019-04-22 11:54:32 -040039RUN chown -R ansible:ansible /var/log
Sylvain Desbureaux78327d72019-03-05 17:40:10 +010040RUN chown ansible:ansible /opt/ansible-server
Timoney, Dan (dt5972)38e175f2019-02-21 14:57:34 -050041
42USER ansible:ansible
43
Timoney, Dan (dt5972)15f406b2019-02-06 17:14:45 -050044
Sylvain Desbureaux1bc56902019-01-30 14:36:14 +010045EXPOSE 8000
46
Taka Cho9bec8482019-02-18 14:31:27 -050047##ENTRYPOINT ["python2", "RestServer.py"]