FROM code.pztrn.name/containers/mirror/golang:1.18.3-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 RUN make metricatord-build RUN make metricator-client-build FROM code.pztrn.name/containers/mirror/golang:1.18.3-alpine LABEL maintainer="Stanislav N. " COPY --from=build /go/src/gitlab.pztrn.name/pztrn/metricator/._bin/metricatord /usr/local/bin/metricatord COPY --from=build /go/src/gitlab.pztrn.name/pztrn/metricator/._bin/metricator-client /usr/local/bin/metricator-client RUN apk add tzdata ENTRYPOINT [ "/usr/local/bin/metricatord", "-config", "/config.yaml" ]