Browse Source

修复编译问题

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

+ 2 - 1
Dockerfile

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