-
-
Notifications
You must be signed in to change notification settings - Fork 101
Expand file tree
/
Copy pathDockerfile.multi-arch
More file actions
22 lines (16 loc) · 704 Bytes
/
Dockerfile.multi-arch
File metadata and controls
22 lines (16 loc) · 704 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
ARG GOVERSION=latest
FROM --platform=$BUILDPLATFORM quay.io/prometheus/golang-builder:${GOVERSION}-main AS builder
# Get sql_exporter
ADD . /go/src/github.com/burningalchemist/sql_exporter
WORKDIR /go/src/github.com/burningalchemist/sql_exporter
# Do makefile
ARG TARGETOS
ARG TARGETARCH
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH make
# Make image and copy build sql_exporter
FROM --platform=$TARGETPLATFORM quay.io/prometheus/busybox:latest
LABEL maintainer="The Prometheus Authors <prometheus-developers@googlegroups.com>"
COPY --from=builder /go/src/github.com/burningalchemist/sql_exporter/sql_exporter /bin/sql_exporter
EXPOSE 9399
USER nobody
ENTRYPOINT [ "/bin/sql_exporter" ]