55 Star 375 Fork 134

feiyu563/PrometheusAlert

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 1.13 KB
一键复制 编辑 原始数据 按行查看 历史
feiyu563 提交于 2024-06-19 20:20 . Update Dockerfile
FROM golang:1.20.6-alpine3.18 as builder
WORKDIR $GOPATH/src/github.com/feiyu563/PrometheusAlert
RUN apk update && \
apk add --no-cache gcc g++ sqlite-libs make git
ENV GO111MODULE on
ENV GOPROXY https://goproxy.io
COPY . $GOPATH/src/github.com/feiyu563/PrometheusAlert
RUN make build
# -----------------------------------------------------------------------------
FROM alpine:3.18
LABEL maintainer="jikun.zhang"
RUN apk update && \
apk add --no-cache tzdata && \
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
echo "Asia/Shanghai" > /etc/timezone && \
apk del tzdata && \
mkdir -p /app/logs && \
apk add --no-cache sqlite-libs curl sqlite
HEALTHCHECK --start-period=10s --interval=20s --timeout=3s --retries=3 \
CMD curl -fs http://localhost:8080/health || exit 1
WORKDIR /app
COPY --from=builder /go/src/github.com/feiyu563/PrometheusAlert/PrometheusAlert .
COPY db/PrometheusAlertDB.db /opt/PrometheusAlertDB.db
COPY conf/app-example.conf conf/app.conf
COPY db db
COPY static static
COPY views views
COPY docker-entrypoint.sh docker-entrypoint.sh
ENTRYPOINT [ "/bin/sh", "/app/docker-entrypoint.sh" ]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/feiyu563/PrometheusAlert.git
git@gitee.com:feiyu563/PrometheusAlert.git
feiyu563
PrometheusAlert
PrometheusAlert
master

搜索帮助