[#50] 完成在x86_64平台上使用buildx来构建arm镜像;重新构建了core/web/prom/grafana以及cpu node镜像;跑通swarm test for arm; 暂时移除dcgm和log路径功能
This commit is contained in:
21
src/metric/prometheus/build/Dockerfile.targets-updater
Normal file
21
src/metric/prometheus/build/Dockerfile.targets-updater
Normal file
@@ -0,0 +1,21 @@
|
||||
FROM python:3.11-slim-bullseye
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive \
|
||||
TZ=Asia/Shanghai \
|
||||
PROMETHEUS_BASE_PATH=/private/argus/metric/prometheus
|
||||
|
||||
RUN set -eux; \
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends ca-certificates tzdata; \
|
||||
rm -rf /var/lib/apt/lists/*; \
|
||||
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# 复用现有脚本与配置(从构建上下文复制)
|
||||
COPY update_targets.py /app/update_targets.py
|
||||
COPY exporter_config.json /app/exporter_config.json
|
||||
|
||||
# 以守护进程模式运行,监听 nodes.json 变化并更新 targets/*.json
|
||||
ENTRYPOINT ["python3", "/app/update_targets.py"]
|
||||
CMD ["--config", "/private/argus/metric/prometheus/nodes.json", "--targets-dir", "/private/argus/metric/prometheus/targets", "--exporter-config", "/app/exporter_config.json", "--log-level", "INFO", "--daemon", "--check-interval", "30"]
|
||||
Reference in New Issue
Block a user