File size: 387 Bytes
158d0ff 560f7df 158d0ff 560f7df 158d0ff 201ce3a 158d0ff 201ce3a 158d0ff 201ce3a 158d0ff | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # 使用官方的 Golang 镜像作为基础镜像
FROM golang:1.18
# 设置工作目录
WORKDIR /app
# 克隆 GitHub 仓库
RUN git clone https://github.com/Jrohy/webssh.git .
# 编译 Go 程序
RUN go build -o webssh .
# 声明服务运行的端口(根据实际需要修改,例如项目文档中默认是8888)
EXPOSE 8888
# 运行编译后的二进制文件
CMD ["./webssh"] |