mirror of https://github.com/dirtbags/moth.git
Tidy up build for RPi (ta John), bump version
This commit is contained in:
parent
dbb90d0105
commit
b08e121b60
|
@ -1,11 +1,10 @@
|
||||||
FROM alpine:3.9 AS builder
|
FROM golang:1.12.0-alpine AS builder
|
||||||
RUN apk --no-cache add go libc-dev git
|
COPY src /go/src/github.com/dirtbags/moth/src
|
||||||
COPY src /root/go/src/github.com/dirtbags/moth/src
|
WORKDIR /go/src/github.com/dirtbags/moth/src
|
||||||
WORKDIR /root/go/src/github.com/dirtbags/moth/src
|
|
||||||
RUN go get .
|
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 --from=builder /mothd /mothd
|
||||||
COPY theme /theme
|
COPY theme /theme
|
||||||
ENTRYPOINT [ "/mothd" ]
|
ENTRYPOINT [ "/mothd" ]
|
||||||
|
|
Loading…
Reference in New Issue