mirror of
https://github.com/jcwimer/openstack-exporter
synced 2026-04-03 13:30:03 +00:00
Added instance deploy metrics and horizon selenium metrics
This commit is contained in:
37
Dockerfile
37
Dockerfile
@@ -1,14 +1,49 @@
|
||||
FROM python:3.8
|
||||
RUN pip install pipenv
|
||||
RUN mkdir /python
|
||||
|
||||
### CACHE PIP DEPENDENCIES
|
||||
COPY Pipfile* /tmp/
|
||||
RUN cd /tmp && pipenv lock --requirements > requirements.txt
|
||||
RUN pip install -r /tmp/requirements.txt
|
||||
###
|
||||
|
||||
### install Chromium
|
||||
RUN apt-get update
|
||||
# stretch uses chromium package not chromium-browser
|
||||
RUN apt-get install chromium=83.0* -y
|
||||
|
||||
# install chromedriver
|
||||
RUN apt-get install -yqq unzip
|
||||
RUN wget -O /tmp/chromedriver.zip https://chromedriver.storage.googleapis.com/83.0.4103.39/chromedriver_linux64.zip
|
||||
RUN unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/
|
||||
|
||||
# install xvfb
|
||||
RUN apt-get install -yqq xvfb
|
||||
|
||||
RUN apt-get -qq clean \
|
||||
&& apt-get autoremove -y \
|
||||
&& rm -rf \
|
||||
/var/lib/apt/lists/* \
|
||||
/tmp/* \
|
||||
/var/tmp/*
|
||||
|
||||
# set display port and dbus env to avoid hanging
|
||||
ENV DISPLAY=:99
|
||||
ENV DBUS_SESSION_BUS_ADDRESS=/dev/null
|
||||
|
||||
COPY docker-entrypoint.sh /root/docker-entrypoint.sh
|
||||
|
||||
RUN mkdir /app
|
||||
WORKDIR /app
|
||||
|
||||
RUN chmod a+x /root/docker-entrypoint.sh
|
||||
###
|
||||
|
||||
WORKDIR /python
|
||||
COPY . .
|
||||
|
||||
# Python output in stdout
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
ENV PYTHONIOENCODING=UTF-8
|
||||
CMD ["python", "/python/openstack_exporter.py"]
|
||||
ENTRYPOINT ["bash", "/root/docker-entrypoint.sh","python", "/python/openstack_exporter.py"]
|
||||
Reference in New Issue
Block a user