ezshare/Dockerfile

18 lines
417 B
Docker
Raw Permalink 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
2021-12-08 14:18:54 +00:00
RUN go mod download -x
2021-12-03 22:04:09 +00:00
COPY . /app
2021-12-08 14:18:54 +00:00
RUN go build -o dist/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
VOLUME [ "/data" ]
2021-12-08 14:18:54 +00:00
COPY --from=builder-base /app/dist/ezshare /usr/bin/ezshare
2021-12-03 22:04:09 +00:00
EXPOSE 50051
EXPOSE 8088
CMD ["/usr/bin/ezshare", "serve"]