-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
27 lines (18 loc) · 899 Bytes
/
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
ARG KATSDPDOCKERBASE_REGISTRY=quay.io/ska-sa
FROM $KATSDPDOCKERBASE_REGISTRY/docker-base-build as build
# Enable Python 3 venv
ENV PATH="$PATH_PYTHON3" VIRTUAL_ENV="$VIRTUAL_ENV_PYTHON3"
# Install Python dependencies
COPY --chown=kat:kat requirements.txt /tmp/install/requirements.txt
RUN install_pinned.py -r /tmp/install/requirements.txt
# Install the current package
COPY --chown=kat:kat . /tmp/install/switch_exporter
RUN cd /tmp/install/switch_exporter && \
python setup.py clean && pip install --no-deps . && pip check
#######################################################################
FROM $KATSDPDOCKERBASE_REGISTRY/docker-base-runtime
LABEL maintainer=sdpdev+switch_exporter@sarao.ac.za
COPY --chown=kat:kat --from=build /home/kat/ve3 /home/kat/ve3
ENV PATH="$PATH_PYTHON3" VIRTUAL_ENV="$VIRTUAL_ENV_PYTHON3"
EXPOSE 9116
ENTRYPOINT ["/sbin/tini", "--", "switch-exporter"]