Added docker2mqtt

This commit is contained in:
2021-04-10 14:39:38 +02:00
parent 56846ab3b8
commit 8066684fe5
3 changed files with 74 additions and 1 deletions

15
docker2mqtt/Dockerfile Normal file
View File

@@ -0,0 +1,15 @@
FROM golang:alpine AS builder
WORKDIR $GOPATH/src/napnap75/docker2mqtt/
COPY docker2mqtt.go .
RUN apk add --no-cache git gcc musl-dev \
&& go mod init github.com/napnap75/multiarch-docker-images/docker2mqtt \
&& go get -d -v \
&& go build -ldflags="-w -s" -o /go/bin/docker2mqtt
FROM alpine:latest
COPY --from=builder /go/bin/docker2mqtt /usr/bin/
ENTRYPOINT ["/usr/bin/docker2mqtt"]