目录* 从官方镜像启动:prom/prometheus
拉取镜像
$ docker pull prom/prometheus
启动容器
方式1:
$ docker run -td -p 9090:9090 --name prometheus1 prom/prometheus
方式2:路径挂载
$ docker run -p 9090:9090 -v /path/l:/etc/l prom/prometheus$ docker run -p 9090:9090 -v /path/to/config:/etc/prometheus prom/prometheus
官方Dockerfile文件如下
ARG ARCH="amd64"
ARG OS="linux"
FROM quay.io/prometheus/busybox-${OS}-${ARCH}:latest
LABEL maintainer="The Prometheus Authors "ARG ARCH="amd64"
ARG OS="linux"
COPY .build/${OS}-${ARCH}/prometheus /bin/prometheus
COPY .build/${OS}-${ARCH}/promtool /bin/promtool
COPY documentation/l /etc/l
COPY console_libraries/ /usr/share/prometheus/console_libraries/
COPY consoles/ /usr/share/prometheus/consoles/
COPY LICENSE /LICENSE
COPY NOTICE /NOTICE
COPY npm_licenses.tar.bz2 /npm_licenses.tar.bz2WORKDIR /prometheus
RUN ln -s /usr/share/prometheus/console_libraries /usr/share/prometheus/consoles/ /etc/prometheus/ && chown -R nobody:nobody /etc/prometheus /prometheusUSER nobody
EXPOSE 9090
VOLUME [ "/prometheus" ]
ENTRYPOINT [ "/bin/prometheus" ]
CMD [ "--config.file=/etc/prometheus/prometheus
本文发布于:2024-02-04 19:54:56,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/170715256759060.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |