This commit is contained in:
mucr
2023-09-14 10:47:25 +08:00
commit 087a1ea6ce
10 changed files with 278 additions and 0 deletions

14
Dockerfile Normal file
View File

@@ -0,0 +1,14 @@
# 使用一个合适的基础镜像,例如官方的 Go 镜像
FROM golang:1.17
# 设置工作目录
WORKDIR /app
# 将 Go 源代码复制到工作目录
COPY . .
# 编译 Go 程序
RUN go build -o main .
# 指定容器启动时运行的命令
CMD ["./main"]