Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to solve report no. 127 #128

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,23 @@ FROM golang:1.21 as build
WORKDIR /go/artifactory_exporter
ADD . /go/artifactory_exporter

RUN go get -d -v ./...

ARG VERSION
ARG SOURCE_COMMIT
ARG SOURCE_BRANCH
ARG BUILD_DATE
ARG BUILD_USER

RUN GOOS=linux GOARCH=amd64 go build -o /go/bin/artifactory_exporter -ldflags " \
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /go/bin/artifactory_exporter -ldflags " \
-X github.com/prometheus/common/version.Version=${VERSION} \
-X github.com/prometheus/common/version.Revision=${SOURCE_COMMIT} \
-X github.com/prometheus/common/version.Branch=${SOURCE_BRANCH} \
-X github.com/prometheus/common/version.BuildDate=${BUILD_DATE} \
-X github.com/prometheus/common/version.BuildUser=${BUILD_USER}"

FROM gcr.io/distroless/base-debian11
FROM alpine:3.19
COPY --from=build /go/bin/artifactory_exporter /

USER nobody
EXPOSE 9531

ENTRYPOINT ["./artifactory_exporter"]
ENTRYPOINT ["/artifactory_exporter"]
Loading