代码拉取完成,页面将自动刷新
ARG BASE=openeuler/openeuler:22.03-lts-sp4
FROM ${BASE}
ARG TARGETARCH
ARG VERSION=2.54.1
RUN curl -fSL --output prometheus.tar.gz https://github.com/prometheus/prometheus/releases/download/v${VERSION}/prometheus-${VERSION}.linux-${TARGETARCH}.tar.gz && \
mkdir /prometheus && tar -zxvf prometheus.tar.gz -C /prometheus --strip-components 1 && \
rm -f prometheus.tar.gz
RUN mkdir -p /etc/prometheus/ /usr/share/prometheus/ && \
mv /prometheus/prometheus /bin/prometheus && \
mv /prometheus/promtool /bin/promtool && \
mv /prometheus/prometheus.yml /etc/prometheus/prometheus.yml && \
mv /prometheus/console_libraries/ /usr/share/prometheus/console_libraries/ && \
mv /prometheus/consoles/ /usr/share/prometheus/consoles/ && \
mv /prometheus/LICENSE /LICENSE && \
mv /prometheus/NOTICE /NOTICE && \
rm -rf /prometheus/
WORKDIR /prometheus
RUN groupadd -r prometheus && useradd -r -g prometheus prometheus && \
ln -s /usr/share/prometheus/console_libraries /usr/share/prometheus/consoles/ /etc/prometheus/ && \
chown -R prometheus:prometheus /etc/prometheus /prometheus
USER prometheus
EXPOSE 9090
VOLUME [ "/prometheus" ]
ENTRYPOINT [ "/bin/prometheus" ]
CMD [ "--config.file=/etc/prometheus/prometheus.yml", \
"--storage.tsdb.path=/prometheus", \
"--web.console.libraries=/usr/share/prometheus/console_libraries", \
"--web.console.templates=/usr/share/prometheus/consoles" ]
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。