ezshare/Dockerfile

21 lines
516 B
Docker
Raw Normal View History

2021-12-03 22:04:09 +00:00
FROM golang:latest as builder-base
WORKDIR /app
COPY go.mod /app/go.mod
COPY go.sum /app/go.sum
RUN go mod download
COPY . /app
2021-12-04 02:31:34 +00:00
RUN CGO_ENABLED=0 go build -o ezshare cmd/ezshare.go
2021-12-03 22:04:09 +00:00
FROM builder-base as certs
VOLUME ["/data"]
CMD ["/app/scripts/gencerts.sh"]
FROM builder-base as cross-compiler
VOLUME ["/data"]
CMD ["/app/scripts/cross-compile.sh"]
FROM alpine:latest
COPY --from=builder-base /app/ezshare /usr/bin/ezshare
EXPOSE 50051
EXPOSE 8088
2021-12-04 02:25:09 +00:00
CMD ["/usr/bin/ezshare","--config", "/data/ezshare.toml" "serve"]