From b08e121b60913ba942c7de1e0d07ab24912b6527 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Fri, 1 Mar 2019 21:18:23 +0000 Subject: [PATCH] Tidy up build for RPi (ta John), bump version --- Dockerfile.moth | 11 +++++------ VERSION | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Dockerfile.moth b/Dockerfile.moth index b7bfd37..b1fd733 100644 --- a/Dockerfile.moth +++ b/Dockerfile.moth @@ -1,11 +1,10 @@ -FROM alpine:3.9 AS builder -RUN apk --no-cache add go libc-dev git -COPY src /root/go/src/github.com/dirtbags/moth/src -WORKDIR /root/go/src/github.com/dirtbags/moth/src +FROM golang:1.12.0-alpine AS builder +COPY src /go/src/github.com/dirtbags/moth/src +WORKDIR /go/src/github.com/dirtbags/moth/src RUN go get . -RUN go build -o /mothd *.go +RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o /mothd *.go -FROM alpine +FROM scratch COPY --from=builder /mothd /mothd COPY theme /theme ENTRYPOINT [ "/mothd" ] diff --git a/VERSION b/VERSION index c3c565f..966f9e8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.0-rc4 +3.1-rc1