[DOCKER][EDIT] Updated Dockerfile
This commit is contained in:
16
Dockerfile
16
Dockerfile
@@ -1,10 +1,16 @@
|
|||||||
FROM debian:9.9-slim
|
FROM golang:latest AS builder
|
||||||
|
|
||||||
|
ENV repo=https://github.com/AlxCzl/mikrotik-exporter
|
||||||
|
|
||||||
|
WORKDIR /go/src/mikrotik-exporter/
|
||||||
|
RUN git clone "${repo}" .
|
||||||
|
RUN go get github.com/mitchellh/gox && go get github.com/tcnksm/ghr \
|
||||||
|
&& go build .
|
||||||
|
|
||||||
|
FROM debian:bullseye-slim
|
||||||
EXPOSE 9436
|
EXPOSE 9436
|
||||||
|
RUN apt update -y
|
||||||
COPY scripts/start.sh /app/
|
COPY scripts/start.sh /app/
|
||||||
COPY dist/mikrotik-exporter_linux_amd64 /app/mikrotik-exporter
|
COPY --from=builder /go/src/mikrotik-exporter/mikrotik-exporter /app/
|
||||||
|
|
||||||
RUN chmod 755 /app/*
|
RUN chmod 755 /app/*
|
||||||
|
|
||||||
ENTRYPOINT ["/app/start.sh"]
|
ENTRYPOINT ["/app/start.sh"]
|
||||||
Reference in New Issue
Block a user