-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
images: Add metalk8s-alert-logger container image
This container image is used for alert history. Refs: #3180
- Loading branch information
1 parent
ff756e3
commit 6963d15
Showing
1 changed file
with
26 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM golang:1.16.0-alpine AS builder | ||
|
||
ENV CGO_ENABLED=0 | ||
|
||
ARG ALERTMANAGER_VERSION=latest | ||
ARG PKG_PATH=/go/src/metalk8s-alert-logger/ | ||
|
||
RUN mkdir -p "$PKG_PATH" | ||
|
||
COPY main.go go.mod "$PKG_PATH" | ||
|
||
WORKDIR "$PKG_PATH" | ||
|
||
RUN sed -i "s/@@ALERTMANAGER_VERSION@@/$ALERTMANAGER_VERSION/g" go.mod \ | ||
&& go mod tidy \ | ||
&& go install | ||
|
||
FROM alpine:3.13.2 | ||
|
||
MAINTAINER moonshot-platform <[email protected]> | ||
|
||
COPY --from=builder /go/bin/ /usr/bin/ | ||
|
||
EXPOSE 19094 | ||
|
||
ENTRYPOINT ["metalk8s-alert-logger"] |