blob: 4e697119d08469ed09006ef58f7ead4229530508 [file] [log] [blame]
Renovate botabfa1982023-12-30 00:05:17 +00001FROM golang:latest@sha256:672a2286da3ee7a854c3e0a56e0838918d0dbb1c18652992930293312de898a6 as builder
avm9996388e622d2021-01-22 18:57:58 +01002
3ENV CGO_ENABLED=0
4
5ENV GO111MODULE=on
6ENV GOPROXY=https://proxy.golang.org
7
8RUN mkdir /gocache
9ENV GOCACHE /gocache
10
11COPY go.mod /go/src/gomodules.avm99963.com/hichip2mqtt/go.mod
12COPY go.sum /go/src/gomodules.avm99963.com/hichip2mqtt/go.sum
13
14WORKDIR /go/src/gomodules.avm99963.com/hichip2mqtt
15
16# Optimization for iterative docker build speed, not necessary for correctness:
17RUN go install github.com/eclipse/paho.mqtt.golang
18RUN go install github.com/flashmob/go-guerrilla
19RUN go install github.com/go-sql-driver/mysql
avm999638355e002021-01-26 23:05:01 +010020RUN go install github.com/minio/minio-go/v7
avm9996388e622d2021-01-22 18:57:58 +010021RUN go install github.com/sirupsen/logrus
22RUN go install github.com/spf13/cobra
23RUN go install gomodules.avm99963.com/forks/parsemail
24
25WORKDIR /go/src/gomodules.avm99963.com/hichip2mqtt/cmd/hichipbridge
26
27COPY . /go/src/gomodules.avm99963.com/hichip2mqtt/cmd/hichipbridge
28
29RUN go install gomodules.avm99963.com/hichip2mqtt/cmd/hichipbridge
30
Renovate botabfa1982023-12-30 00:05:17 +000031FROM alpine@sha256:51b67269f354137895d43f3b3d810bfacd3945438e94dc5ac55fdac340352f48
avm9996388e622d2021-01-22 18:57:58 +010032LABEL maintainer "me@avm99963.com"
33
34RUN apk add --no-cache tini
35COPY --from=builder /go/bin/hichipbridge /
36ENTRYPOINT ["/sbin/tini", "--", "/hichipbridge", "serve"]