1 Star 0 Fork 126

小林 / PrometheusAlert

forked from feiyu563 / PrometheusAlert 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Dockerfile 974 Bytes
一键复制 编辑 原始数据 按行查看 历史
FROM golang:1.14-alpine3.12 as builder
WORKDIR $GOPATH/src/github.com/feiyu563/PrometheusAlert
RUN apk update && apk upgrade && apk add --no-cache gcc g++ sqlite-libs
ENV GO111MODULE on
ENV GOPROXY https://goproxy.io
COPY . $GOPATH/src/github.com/feiyu563/PrometheusAlert
RUN go mod vendor && go build
# -----------------------------------------------------------------------------
FROM alpine:3.12
LABEL maintainer="jikun.zhang"
RUN apk update && apk upgrade && apk add --no-cache sqlite-libs
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 logs logs
COPY static static
COPY views views
#ENTRYPOINT [ "/app/PrometheusAlert" ]
CMD if [ ! -f /app/db/PrometheusAlertDB.db ];then cp /opt/PrometheusAlertDB.db /app/db/PrometheusAlertDB.db;echo 'init ok!';else echo 'pass!';fi && /app/PrometheusAlert
Go
1
https://gitee.com/lhsydw/PrometheusAlert.git
git@gitee.com:lhsydw/PrometheusAlert.git
lhsydw
PrometheusAlert
PrometheusAlert
master

搜索帮助