FocalBoard / Dockerfile
keflag's picture
Update Dockerfile
edd237d verified
raw
history blame contribute delete
912 Bytes
# 构建阶段:升级 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"]