File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11FROM python:3.10-slim
2-
2+ # Can happen early, almost never changes
33WORKDIR /opt/app
4- COPY . .
5- RUN pip install --no-cache-dir -r /opt/app/requirements.txt
64
7- # Install packages that we need. vim is for helping with debugging
5+ # Install packages that we need.
6+ # Again does not change often
87ENV DEBIAN_FRONTEND noninteractive
98RUN apt-get update && \
109 apt-get upgrade -yq ca-certificates && \
1110 apt-get install -yq --no-install-recommends \
1211 prometheus-node-exporter
1312
14-
15- EXPOSE 7860
16- EXPOSE 8000
13+ # Some environment variables that don't change often
14+ EXPOSE 7860
15+ EXPOSE 8000
1716EXPOSE 9100
18-
19-
2017ENV GRADIO_SERVER_NAME="0.0.0.0"
2118
22- CMD bash -c "prometheus-node-exporter --web.listen-address=':9100' & python /opt/app/app.py"
19+ # We put this near the end since it can change
20+ COPY requirements.txt requirements.txt
21+ RUN pip install --no-cache-dir -r /opt/app/requirements.txt
22+
23+ # This changes the most, so it goes last!
24+ COPY . .
25+ CMD bash -c "prometheus-node-exporter --web.listen-address=':9100' & python /opt/app/app.py"
You can’t perform that action at this time.
0 commit comments