File: Dockerfile

package info (click to toggle)
prometheus-script-exporter 3.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 336 kB
  • sloc: makefile: 51; sh: 41
file content (14 lines) | stat: -rw-r--r-- 459 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
FROM golang:1.24.1 AS build
WORKDIR /script_exporter
COPY go.mod go.sum /script_exporter/
RUN go mod download
COPY . .
RUN export CGO_ENABLED=0 && make build

FROM alpine:3.21.3
RUN apk add --no-cache --update bash curl jq ca-certificates tini python3
RUN mkdir /script_exporter
COPY --from=build /script_exporter/bin/script_exporter /script_exporter
WORKDIR /script_exporter
USER nobody
ENTRYPOINT  [ "/sbin/tini", "--", "/script_exporter/script_exporter" ]