blob: 5a1c394d07c12b8c82bdcb299a4e4a252f1a2f43 [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 \
Taka Choef127a52019-11-01 15:52:15 -040011 iputils \
Taka Cho9bec8482019-02-18 14:31:27 -050012 bash \
Taka Choef127a52019-11-01 15:52:15 -040013 py3-pip \
Sylvain Desbureaux78327d72019-03-05 17:40:10 +010014 openssh-client \
Taka Choef127a52019-11-01 15:52:15 -040015 python3 &&\
Sylvain Desbureaux1bc56902019-01-30 14:36:14 +010016 apk add --no-cache --virtual .build-deps build-base \
17 libffi-dev \
18 openssl-dev \
Taka Choef127a52019-11-01 15:52:15 -040019 python3-dev &&\
20 pip3 install --no-cache-dir --upgrade pip==$PIP_TAG && \
21 pip3 install --no-cache-dir -r ansible-server/requirements.txt &&\
Sylvain Desbureaux1bc56902019-01-30 14:36:14 +010022 apk del .build-deps
23
Timoney, Dan (dt5972)38e175f2019-02-21 14:57:34 -050024RUN addgroup -S ansible && adduser -S ansible -G ansible
Taka Choef127a52019-11-01 15:52:15 -040025
Timoney, Dan (dt5972)38e175f2019-02-21 14:57:34 -050026COPY --chown=ansible:ansible ansible-server ansible-server
27COPY --chown=ansible:ansible configuration/ansible.cfg /etc/ansible/ansible.cfg
28
Sylvain Desbureaux1bc56902019-01-30 14:36:14 +010029WORKDIR /opt/ansible-server
30
Timoney, Dan (dt5972)15f406b2019-02-06 17:14:45 -050031RUN mkdir /opt/onap ; ln -s /opt/ansible-server /opt/onap/ccsdk
Timoney, Dan (dt5972)38e175f2019-02-21 14:57:34 -050032RUN echo > /var/log/ansible-server.log
Taka Choc6e85bc2019-04-22 11:54:32 -040033RUN chown -R ansible:ansible /var/log
Sylvain Desbureaux78327d72019-03-05 17:40:10 +010034RUN chown ansible:ansible /opt/ansible-server
Timoney, Dan (dt5972)38e175f2019-02-21 14:57:34 -050035
36USER ansible:ansible
37
Timoney, Dan (dt5972)15f406b2019-02-06 17:14:45 -050038
Sylvain Desbureaux1bc56902019-01-30 14:36:14 +010039EXPOSE 8000
40
Taka Cho9bec8482019-02-18 14:31:27 -050041##ENTRYPOINT ["python2", "RestServer.py"]