mirror of
https://github.com/byReqz/probehost2.git
synced 2024-11-23 23:24:54 +00:00
reworked dockerfile for local building
This commit is contained in:
parent
0c4db69e08
commit
55dfb5405a
@ -1,6 +1,12 @@
|
||||
FROM alpine:latest
|
||||
FROM golang:latest as builder
|
||||
WORKDIR /build
|
||||
COPY . .
|
||||
RUN go get -u
|
||||
RUN CGO_ENABLED=0 go build -o probehost2
|
||||
|
||||
FROM alpine:latest
|
||||
RUN apk update
|
||||
RUN apk add curl jq
|
||||
RUN curl -s https://api.github.com/repos/byReqz/probehost2/releases/latest | jq -r '.assets[].browser_download_url' | grep "probehost2" | xargs curl -L -o probehost2
|
||||
ENTRYPOINT ["/probehost2"]
|
||||
RUN apk add mtr
|
||||
COPY --from=builder /build/probehost2 /
|
||||
RUN touch /probehost2.log
|
||||
CMD ["/probehost2"]
|
||||
|
Loading…
Reference in New Issue
Block a user