Skip to content

Commit

Permalink
DBA-793-SYNC-FORK-POSTGRES-EXPORTER-ADDING-DOKCERFILE (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
gfranco9 authored Jun 20, 2024
2 parents dfd14a9 + f834bd3 commit 3509d89
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
ARG ARCH="amd64"
ARG OS="linux"
FROM quay.io/prometheus/busybox-${OS}-${ARCH}:latest
LABEL maintainer="The Prometheus Authors <[email protected]>"

ARG ARCH="amd64"
ARG OS="linux"
COPY .build/${OS}-${ARCH}/postgres_exporter /bin/postgres_exporter

EXPOSE 9187
USER nobody
ENTRYPOINT [ "/bin/postgres_exporter" ]
FROM golang:1.12.6-alpine as build
WORKDIR ${GOPATH}/src/github.com/quintoandar
RUN apk update && apk add make git curl && git clone https://github.com/quintoandar/postgres_exporter.git
WORKDIR ${GOPATH}/src/github.com/quintoandar/postgres_exporter
RUN go get -u github.com/prometheus/promu
RUN make build
RUN chmod +x postgres_exporter && mv postgres_exporter /tmp/postgres_exporter


FROM alpine:3.18 as final

COPY --from=build ["/tmp/postgres_exporter", "/" ]

WORKDIR /opt/exporter

EXPOSE 9187

ENTRYPOINT [ "/postgres_exporter" ]

1 comment on commit 3509d89

@chip-n-dale
Copy link

@chip-n-dale chip-n-dale bot commented on 3509d89 Jun 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @gfranco9!

The GitLeaks SecTool reported some possibly exposed credentials/secrets, how about giving them a look?

GitLeaks Alert Sync
[
  {
    "line": "REDACTED",
    "lineNumber": 1,
    "offender": "REDACTED",
    "offenderEntropy": -1,
    "commit": "db4c6e8ee70ed6f6f9c8f4f8ab4611f884d33ff1",
    "repo": "postgres_exporter",
    "repoURL": "",
    "leakURL": "",
    "rule": "Asymmetric Private Key",
    "commitMessage": "PMM-7806: add compatibility with percona pg exporter (#68)\n\n* add compatibility with old exporter",
    "author": "Alexey Mukas",
    "email": "[email protected]",
    "file": "testdata/ssl/client/server.key",
    "date": "2022-09-06T11:37:50+02:00",
    "tags": "key, AsymmetricPrivateKey"
  },
  {
    "line": "REDACTED",
    "lineNumber": 1,
    "offender": "REDACTED",
    "offenderEntropy": -1,
    "commit": "db4c6e8ee70ed6f6f9c8f4f8ab4611f884d33ff1",
    "repo": "postgres_exporter",
    "repoURL": "",
    "leakURL": "",
    "rule": "Asymmetric Private Key",
    "commitMessage": "PMM-7806: add compatibility with percona pg exporter (#68)\n\n* add compatibility with old exporter",
    "author": "Alexey Mukas",
    "email": "[email protected]",
    "file": "testdata/ssl/server/server.key",
    "date": "2022-09-06T11:37:50+02:00",
    "tags": "key, AsymmetricPrivateKey"
  },
  {
    "line": "REDACTED",
    "lineNumber": 1,
    "offender": "REDACTED",
    "offenderEntropy": -1,
    "commit": "dfbbcee47774fb44dd222fdb87850b0f9ec7f968",
    "repo": "postgres_exporter",
    "repoURL": "",
    "leakURL": "",
    "rule": "Asymmetric Private Key",
    "commitMessage": "PMM-4533 Test for SSL support. (#13)\n\n",
    "author": "Carlos Salguero",
    "email": "[email protected]",
    "file": "testdata/ssl/server.key",
    "date": "2019-08-23T06:11:49-03:00",
    "tags": "key, AsymmetricPrivateKey"
  }
]

In case of false-positives, more information is available on GitLeaks FAQ
If you had any other problem or question during this process, be sure to contact us on the Security space on GChat!

Please sign in to comment.