-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #198 from nats-io/feature/auto-image-build
Adding image build to workflow
- Loading branch information
Showing
4 changed files
with
104 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
FROM golang:1.19.3 AS build | ||
COPY . /go/src/prometheus-nats-exporter | ||
WORKDIR /go/src/prometheus-nats-exporter | ||
RUN make prometheus-nats-exporter.docker | ||
|
||
FROM alpine:latest as osdeps | ||
|
||
RUN apk add --no-cache ca-certificates | ||
|
||
ARG BINARY=prometheus-nats-exporter | ||
|
||
FROM scratch | ||
COPY --from=build /go/src/prometheus-nats-exporter/prometheus-nats-exporter.docker /prometheus-nats-exporter | ||
|
||
COPY ${BINARY} /${BINARY} | ||
|
||
COPY --from=osdeps /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ | ||
|
||
EXPOSE 7777 | ||
|
||
ENTRYPOINT ["/prometheus-nats-exporter"] | ||
CMD ["--help"] |