-
Notifications
You must be signed in to change notification settings - Fork 755
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (26 loc) · 1.03 KB
/
Copy pathDockerfile
File metadata and controls
44 lines (26 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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.cn,direct
COPY . $GOPATH/src/github.com/feiyu563/PrometheusAlert
RUN go 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 && \
mkdir -p /app/logs && \
apk add --no-cache sqlite-libs curl sqlite
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" ]