Spaces:
Running
Running
File size: 912 Bytes
ca58b22 71b193a ca58b22 71b193a afcb224 ca58b22 afcb224 ca58b22 afcb224 ca58b22 edd237d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | # 构建阶段:升级 Go 版本解决 toolchain 错误
FROM golang:1.22-bullseye AS builder
# 安装 Node.js 18
RUN apt-get update && apt-get install -y curl git && \
curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
apt-get install -y nodejs
WORKDIR /app
# 克隆 v8.0.0 源码
RUN git clone --depth 1 --branch v8.0.0 https://github.com/mattermost/focalboard.git .
# 编译前端
RUN cd webapp && npm install && npm run pack
# 编译后端(Go 1.22 支持 toolchain 指令)
RUN make server
# 运行阶段
FROM debian:bullseye-slim
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=builder /app/bin/focalboard-server ./
COPY --from=builder /app/webapp/pack ./webapp/pack
COPY --from=builder /app/config.json ./
EXPOSE 7860
CMD ["./focalboard-server", "--port", "7860", "--dbtype", "sqlite3"] |