Skip to content
Snippets Groups Projects
Commit 5330552c authored by exp-caesium's avatar exp-caesium
Browse files

add Dockerfile & CI

based off b3vis/apcupsd_exporter
parents
No related branches found
No related tags found
No related merge requests found
Pipeline #5400 failed
stages:
- build
image: docker:latest
services:
- name: docker:dind
command: [ "--insecure-registry=registry.cslab" ]
before_script:
- docker info
build:
stage: build
script:
- docker build
--tag registry.cslab/prometheus/apcupsd-exporter:latest
.
- docker push registry.cslab/prometheus/apcupsd-exporter:latest
tags:
- dind
FROM golang:alpine AS build
RUN apk add --no-cache git \
&& go get -u github.com/mdlayher/apcupsd_exporter \
&& go get -t -v ./..
FROM alpine:latest
COPY --from=build /go/bin/apcupsd_exporter /usr/local/bin/apcupsd_exporter
EXPOSE 9162
CMD /usr/local/bin/apcupsd_exporter -apcupsd.addr $APCUPSDADDR
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment