metricator/Dockerfile

25 lines
766 B
Docker
Raw Normal View History

2020-12-23 20:07:14 +05:00
FROM registry.gitlab.pztrn.name/containers/mirror/golang:1.15.5-alpine AS build
WORKDIR /go/src/gitlab.pztrn.name/pztrn/metricator
COPY . .
ARG CI_PROJECT_NAME
ARG CI_COMMIT_SHA
ARG CI_COMMIT_REF_NAME
ARG CI_COMMIT_TAG
ENV CGO_ENABLED=0
RUN apk add bash git make
2020-12-23 20:07:14 +05:00
RUN make metricatord-build
2020-12-24 23:17:38 +05:00
RUN make metricator-client-build
2020-12-23 20:07:14 +05:00
FROM registry.gitlab.pztrn.name/containers/mirror/golang:1.15.5-alpine
LABEL maintainer="Stanislav N. <pztrn@pztrn.name>"
2020-12-23 20:28:24 +05:00
COPY --from=build /go/src/gitlab.pztrn.name/pztrn/metricator/._bin/metricatord /usr/local/bin/metricatord
2020-12-24 23:17:38 +05:00
COPY --from=build /go/src/gitlab.pztrn.name/pztrn/metricator/._bin/metricator-client /usr/local/bin/metricator-client
2020-12-23 20:07:14 +05:00
RUN apk add tzdata
ENTRYPOINT [ "/usr/local/bin/metricatord", "-config", "/config.yaml" ]