-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile.xdmod-openstack
49 lines (43 loc) · 2.13 KB
/
Dockerfile.xdmod-openstack
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Dockerfile to run python scripts to pull data from openstack
FROM python:3.9.0
RUN apt-get update \
&& apt-get install -y apt-transport-https \
&& apt-get install -y default-mysql-client \
&& apt-get install -y tar gzip \
&& mkdir /app \
&& pip3 install --upgrade pip \
&& pip3 install keystoneauth python-keystoneclient python-novaclient python-cinderclient cryptography python-openstacksdk \
mysql mysql-connector-python-rf pexpect \
&& pip3 install -I mysql-connector-python==8.0.29
COPY ./hypervisor_facts.py /app/xdmod-openstack-hypervisor
COPY ./moc_openstack_api_reporting.py /app/xdmod-openstack-reporting
COPY ./GetConfigFiles.py /app/xdmod-get-config-files
COPY ./xdmod-get-config.sh /app/xdmod-get-config.sh
COPY ./run-xdmod-openstack-hypervisor.sh /app/run-xdmod-openstack-hypervisor.sh
COPY ./run-xdmod-openstack.sh /app/run-xdmod-openstack.sh
COPY ./moc_db_helper_functions.py /app/moc_db_helper_functions.py
COPY ./get_users_from_keycloak.py /app/get_users_from_keycloak.py
COPY ./process_hierarchy.py /app/xdmod-process-hierarchy
RUN chmod 774 /app/xdmod-openstack-hypervisor \
&& sed -i -e 's/\r$//' /app/xdmod-openstack-hypervisor \
&& chmod 774 /app/xdmod-openstack-reporting \
&& sed -i -e 's/\r$//' /app/xdmod-openstack-reporting \
&& chmod 774 /app/xdmod-get-config-files \
&& sed -i -e 's/\r$//' /app/xdmod-get-config-files \
&& chmod 774 /app/run-xdmod-openstack.sh \
&& sed -i -e 's/\r$//' /app/run-xdmod-openstack.sh \
&& chmod 774 /app/run-xdmod-openstack-hypervisor.sh \
&& sed -i -e 's/\r$//' /app/run-xdmod-openstack-hypervisor.sh \
&& chmod 774 /app/xdmod-get-config.sh \
&& sed -i -e 's/\r$//' /app/xdmod-get-config.sh \
&& chmod 774 /app/moc_db_helper_functions.py \
&& sed -i -e 's/\r$//' /app/moc_db_helper_functions.py \
&& chmod 774 /app/get_users_from_keycloak.py \
&& sed -i -e 's/\r$//' /app/get_users_from_keycloak.py \
&& chmod 774 /app/xdmod-process-hierarchy \
&& sed -i -e 's/\r$//' /app/xdmod-process-hierarchy \
&& chmod -R g+rwx /app \
&& chgrp -R 0 /app
EXPOSE 8080
CMD ["/app/run-xdmod-openstack.sh"]
WORKDIR /