From c41b23629dca9d2f48955d9dec544c802d2a1d50 Mon Sep 17 00:00:00 2001 From: walker Date: Mon, 7 Aug 2023 16:41:16 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4Dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 738371c..4772aa2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,10 @@ +FROM golang:1.20.7 as builder +WORKDIR /go/src/joylink.club/bj-rtsts-server +COPY ./* . +RUN go build -o bj-rtsts-server + + FROM scratch - -COPY bj-rtsts-server /usr/local/bin/bj-rtsts-server - +COPY --from=builder bj-rtsts-server . WORKDIR /bj-rtsts - CMD [ "bj-rtsts-server" ] \ No newline at end of file