-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathsvtconnect.ubuntu.Dockerfile
31 lines (30 loc) · 1.04 KB
/
svtconnect.ubuntu.Dockerfile
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
# docker build -t svtconnect -f svtconnect.Dockerfile .
# docker run -i -p 9091:9091 --name svtconnect svtconnect
# User Ubuntu as the base Image
FROM ubuntu
#
LABEL maintainer="Hewlett Packard Enterprise"
LABEL version="1.0"
LABEL copyright="Hewlett Packard Enterprise, 2019"
LABEL license="GNU General Public License v3"
LABEL DESCRIPTION="CTC SimpliVity Pythone container based on Ubuntu"
# Install Python 3.6
RUN apt-get update
RUN apt-get -y install python3.6 && \
apt-get -y install python3-pip && \
apt-get -y install vim && \
apt-get -y install cron
# Install the necessary Python packages:
RUN /usr/bin/pip3 install requests && \
/usr/bin/pip3 install fernet && \
/usr/bin/pip3 install cryptography && \
/usr/bin/pip3 install lxml && \
/usr/bin/pip3 install prometheus_client
# copy the necessary python files to the container
RUN mkdir /opt/svt
COPY SimpliVityClass.py /opt/svt
COPY svtPromConnector.py /opt/svt
COPY SvtConnector.key /opt/svt
COPY SvtConnector.xml /opt/svt
# Start the collector
CMD /usr/bin/python3.6 /opt/svt/svtPromConnector.py