修改dockerfile

This commit is contained in:
walker 2023-08-07 16:49:06 +08:00
parent 2913ecec13
commit ed94788770

View File

@ -1,10 +1,10 @@
FROM golang:1.20.7 as builder FROM golang:1.20.7 as builder
WORKDIR /go/src/joylink.club/bj-rtsts-server WORKDIR /go/src/joylink.club/bj-rtsts-server
COPY ./* . COPY ./* ./
RUN go build -o bj-rtsts-server RUN go build -o bj-rtsts-server
FROM scratch FROM scratch
COPY --from=builder bj-rtsts-server .
WORKDIR /bj-rtsts WORKDIR /bj-rtsts
COPY --from=builder bj-rtsts-server .
CMD [ "bj-rtsts-server" ] CMD [ "bj-rtsts-server" ]