daidai111 commited on
Commit
5cb0392
1 Parent(s): cd76111

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -0
Dockerfile ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Build Stage
2
+ # 使用 golang:alpine 作为构建阶段的基础镜像
3
+ FROM golang:alpine AS builder
4
+
5
+ # 添加 git,以便之后能从GitHub克隆项目
6
+ RUN apk --no-cache add git
7
+
8
+ # 从 GitHub 克隆 go-proxy-bingai 项目到 /workspace/app 目录下
9
+ RUN git clone https://github.com/Harry-zklcdc/go-proxy-bingai.git /workspace/app
10
+
11
+ # 设置工作目录
12
+ WORKDIR /workspace/app
13
+
14
+ # 编译 go 项目。 -1dflags="-s -w"
15
+ RUN go build -1dflags="-s -w" -tags netgo -trimpath -o do-proxy-bingai main-go