Merge pull request #283 from yukaichao/patch-1

添加docker自动构建镜像文件
pull/291/head
Babosa 2024-05-21 15:40:45 +08:00 committed by GitHub
commit 81758d8f73
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 21 additions and 0 deletions

21
Dockerfile Normal file
View File

@ -0,0 +1,21 @@
# 使用 Go 语言官方基础镜像
FROM golang:latest
# 设置工作目录
WORKDIR /app
# 复制所有文件到工作目录
COPY . .
# 初始化 Go module
RUN go mod init
# 构建应用
RUN go build -o easydarwin .
# 暴露所需的端口
EXPOSE 554
EXPOSE 10008
# 启动应用
CMD ["./easydarwin"]