Skip to content

Commit

Permalink
images: Add metalk8s-alert-logger container image
Browse files Browse the repository at this point in the history
This container image is used for alert history.

Refs: #3180
  • Loading branch information
alexandre-allard committed Mar 9, 2021
1 parent ff756e3 commit 6963d15
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions images/metalk8s-alert-logger/Dockerfile
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"]

0 comments on commit 6963d15

Please sign in to comment.