fix issues

This commit is contained in:
Rogee
2024-09-21 13:52:47 +08:00
parent 5aecfe6379
commit f8a7e87965
13 changed files with 156 additions and 51 deletions

20
Dockerfile Normal file
View File

@@ -0,0 +1,20 @@
FROM docker.hub.ipao.vip/golang:1.22-alpine as builder
COPY . /app
RUN go env -w GOPROXY=https://go.hub.ipao.vip,direct && \
go env -w GO111MODULE=on && \
cd /app && \
go mod tidy && \
go build -o /app/exporter .
FROM docker.hub.ipao.vip/alpine:3.20
COPY --from=builder /app/exporter /usr/local/bin/exporter
COPY config.yml /root/.exporter.yml
WORKDIR /root
ENTRYPOINT ["/usr/local/bin/exporter"]
CMD [ "serve" ]