正在显示
1 个修改的文件
包含
5 行增加
和
2 行删除
@@ -6,9 +6,12 @@ RUN git clone http://gitlab.fjmaimaimai.com/mmm-go/gocomm.git /go/src/gocomm \ | @@ -6,9 +6,12 @@ RUN git clone http://gitlab.fjmaimaimai.com/mmm-go/gocomm.git /go/src/gocomm \ | ||
6 | && cd /go/src/gocomm \ | 6 | && cd /go/src/gocomm \ |
7 | && git pull | 7 | && git pull |
8 | WORKDIR /go/src/opp | 8 | WORKDIR /go/src/opp |
9 | + | ||
10 | +COPY go.mod . | ||
11 | +RUN go mod download | ||
12 | + | ||
9 | COPY . . | 13 | COPY . . |
10 | -RUN go mod download \ | ||
11 | - && GOOS=linux CGO_ENABLED=0 go build -ldflags="-s -w" -o opp main.go | 14 | +RUN GOOS=linux CGO_ENABLED=0 go build -ldflags="-s -w" -o opp main.go |
12 | 15 | ||
13 | FROM alpine:latest | 16 | FROM alpine:latest |
14 | RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \ | 17 | RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \ |
-
请 注册 或 登录 后发表评论