Use directory for go build.

This commit is contained in:
2022-07-06 13:35:47 +02:00
parent ebec3cc09d
commit 91dbaa3de9

View File

@@ -1,7 +1,8 @@
FROM golang:alpine AS build
MAINTAINER chris
RUN apk add git --no-cache && \
git clone https://github.com/mdlayher/apcupsd_exporter && \
git clone https://github.com/mdlayher/apcupsd_exporter /tmp/build && \
cd /tmp/build && \
go build -o /go/bin/apcupsd_exporter
FROM alpine:latest