Sign inSign up

quynhbofit/ipsec_exporter

By quynhbofit

•Updated over 3 years ago

Image
0

279

quynhbofit/ipsec_exporter repository overview

⁠Git repo:

https://github.com/jlti-dev/ipsec_exporter.git⁠

⁠Dockerfile

FROM golang:1.18 as builder
WORKDIR /app
COPY go.mod go.mod
RUN go get github.com/prometheus/client_golang/prometheus && \
        go get github.com/prometheus/client_golang/prometheus/promhttp && \
        go get github.com/strongswan/govici/vici
#       go mod download
COPY app /app
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main .

FROM alpine:latest
WORKDIR /app

COPY --from=builder /app/main /app/main
# Reserved Exporter Port for this exporter
EXPOSE 9814 
CMD ["/app/main"]

⁠docker-compose.yaml

version: '3'

services:
    ipsec_exporter:
        # restart: unless-stopped
        build: .

⁠Run container

docker run -itd -p 9814:9814 -v /var/run/:/var/run/ --name ipsec_exporter quynhbofit/ipsec_exporter:latest

Tag summary

Content type

Image

Digest

sha256:518483de3…

Size

9.2 MB

Last updated

over 3 years ago

docker pull quynhbofit/ipsec_exporter