build: add Dockerfile to generate and server libghostty c docs

pull/8907/merge
Mitchell Hashimoto 2025-09-29 08:31:27 -07:00
parent 12d3c130c8
commit 3a95920edf
No known key found for this signature in database
GPG Key ID: 523D5DC389D273BC
1 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,21 @@
#--------------------------------------------------------------------
# Generate documentation with Doxygen
#--------------------------------------------------------------------
FROM ubuntu:24.04 AS builder
RUN apt-get update && apt-get install -y \
doxygen \
graphviz \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /ghostty
COPY include/ ./include/
COPY Doxyfile ./
RUN mkdir -p zig-out/share/ghostty/doc/libghostty
RUN doxygen
#--------------------------------------------------------------------
# Host the static HTML
#--------------------------------------------------------------------
FROM nginx:alpine AS runtime
COPY --from=builder /ghostty/zig-out/share/ghostty/doc/libghostty /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]