ezshare/Dockerfile

17 lines
419 B
Docker
Raw Normal View History

2021-12-04 09:25:54 +00:00
FROM golang:alpine as builder-base
2021-12-03 22:04:09 +00:00
WORKDIR /app
COPY go.mod /app/go.mod
COPY go.sum /app/go.sum
RUN go mod download
COPY . /app
2021-12-06 05:15:06 +00:00
RUN go build -o ezshare main.go
2021-12-03 22:04:09 +00:00
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:39:14 +00:00
CMD ["/usr/bin/ezshare", "--config", "/data/ezshare.toml", "serve"]