Fix Dockerfile
This commit is contained in:
parent
4e0cc92c8e
commit
9b21e1f0cb
@ -2,16 +2,16 @@ FROM golang:alpine as builder-base
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY go.mod /app/go.mod
|
COPY go.mod /app/go.mod
|
||||||
COPY go.sum /app/go.sum
|
COPY go.sum /app/go.sum
|
||||||
RUN go mod download
|
RUN go mod download -x
|
||||||
COPY . /app
|
COPY . /app
|
||||||
RUN go build -o ezshare main.go
|
RUN go build -o dist/ezshare main.go
|
||||||
|
|
||||||
FROM builder-base as cross-compiler
|
FROM builder-base as cross-compiler
|
||||||
VOLUME ["/data"]
|
VOLUME ["/data"]
|
||||||
CMD ["/app/scripts/cross-compile.sh"]
|
CMD ["/app/scripts/cross-compile.sh"]
|
||||||
|
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
COPY --from=builder-base /app/ezshare /usr/bin/ezshare
|
COPY --from=builder-base /app/dist/ezshare /usr/bin/ezshare
|
||||||
EXPOSE 50051
|
EXPOSE 50051
|
||||||
EXPOSE 8088
|
EXPOSE 8088
|
||||||
CMD ["/usr/bin/ezshare", "--config", "/data/ezshare.toml", "serve"]
|
CMD ["/usr/bin/ezshare", "--config", "/data/ezshare.toml", "serve"]
|
Loading…
Reference in New Issue
Block a user