Browse Source

尝试新的编译路径描述

Signed-off-by: allan716 <[email protected]>
allan716 4 years ago
parent
commit
54b89dd219
1 changed files with 1 additions and 2 deletions
  1. 1 2
      Dockerfile

+ 1 - 2
Dockerfile

@@ -12,8 +12,7 @@ ENV GOPROXY https://goproxy.cn,direct
 WORKDIR /homelab/buildspace
 COPY . .
 # 执行编译,-o 指定保存位置和程序编译名称
-RUN cd ./cmd/chinesesubfinder \
-    && go build -ldflags="-s -w" -o /app/chinesesubfinder
+RUN go build -ldflags="-s -w" $PWD/cmd/chinesesubfinder/main.go -o /app/chinesesubfinder
 
 # 运行时环境
 FROM lsiobase/ubuntu:bionic