-
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
d1185a8
commit eb5add1
Showing
1 changed file
with
30 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,30 @@ | ||
ARG BUILD_IMAGE_NAME=golang | ||
ARG BUILD_IMAGE_TAG=1.16.0-alpine | ||
FROM $BUILD_IMAGE_NAME:$BUILD_IMAGE_TAG 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 | ||
|
||
ARG RUN_IMAGE_NAME=alpine | ||
ARG RUN_IMAGE_TAG=3.13.2 | ||
FROM $RUN_IMAGE_NAME:$RUN_IMAGE_TAG | ||
|
||
MAINTAINER moonshot-platform <[email protected]> | ||
|
||
COPY --from=builder /go/bin/ /usr/bin/ | ||
|
||
EXPOSE 19094 | ||
|
||
ENTRYPOINT ["metalk8s-alert-logger"] |