diff options
| author | Can Celik <ogulcancelik@gmail.com> | 2026-04-04 19:22:04 +0300 |
|---|---|---|
| committer | Can Celik <ogulcancelik@gmail.com> | 2026-04-05 01:23:06 +0300 |
| commit | 41dd733ca7123c9ac4bfc6c781697a660e95b052 (patch) | |
| tree | 3fc91815ca139ef2e0b281bba0abda4ef15175f4 /vendor/libghostty-vt/src/build/docker | |
| parent | 55c138263e190a1e79d4b997bfb9397306c0ec1f (diff) | |
feat: finish ghostty pane backend integration
Diffstat (limited to 'vendor/libghostty-vt/src/build/docker')
3 files changed, 113 insertions, 0 deletions
diff --git a/vendor/libghostty-vt/src/build/docker/debian/Dockerfile b/vendor/libghostty-vt/src/build/docker/debian/Dockerfile new file mode 100644 index 00000000..ffeef3d6 --- /dev/null +++ b/vendor/libghostty-vt/src/build/docker/debian/Dockerfile @@ -0,0 +1,43 @@ +ARG DISTRO_VERSION="13" +FROM docker.io/library/debian:${DISTRO_VERSION} + +# Install Dependencies +RUN DEBIAN_FRONTEND="noninteractive" apt-get -qq update && \ + apt-get -qq -y --no-install-recommends install \ + # Build Tools + blueprint-compiler \ + build-essential \ + curl \ + libbz2-dev \ + libonig-dev \ + libxml2-utils \ + lintian \ + lsb-release \ + libxml2-utils \ + pandoc \ + # Ghostty Dependencies + libadwaita-1-dev \ + libgtk-4-dev \ + libgtk4-layer-shell-dev && \ + # Clean up for better caching + rm -rf /var/lib/apt/lists/* + +WORKDIR /src + +COPY ./build.zig ./build.zig.zon /src/ + +# Install zig +# https://ziglang.org/download/ + +RUN export ZIG_VERSION=$(sed -n -E 's/^\s*\.?minimum_zig_version\s*=\s*"([^"]+)".*/\1/p' build.zig.zon) && curl -L -o /tmp/zig.tar.xz "https://ziglang.org/download/$ZIG_VERSION/zig-$(uname -m)-linux-$ZIG_VERSION.tar.xz" && \ + tar -xf /tmp/zig.tar.xz -C /opt && \ + rm /tmp/zig.tar.xz && \ + ln -s "/opt/zig-$(uname -m)-linux-$ZIG_VERSION/zig" /usr/local/bin/zig + +COPY . /src + +RUN zig build \ + -Doptimize=Debug \ + -Dcpu=baseline + +RUN ./zig-out/bin/ghostty +version diff --git a/vendor/libghostty-vt/src/build/docker/lib-c-docs/Dockerfile b/vendor/libghostty-vt/src/build/docker/lib-c-docs/Dockerfile new file mode 100644 index 00000000..a3cfdcc9 --- /dev/null +++ b/vendor/libghostty-vt/src/build/docker/lib-c-docs/Dockerfile @@ -0,0 +1,38 @@ +#-------------------------------------------------------------------- +# Generate documentation with Doxygen +#-------------------------------------------------------------------- +FROM --platform=linux/amd64 archlinux:latest AS builder + +# Build argument for noindex header +ARG ADD_NOINDEX_HEADER=false +RUN pacman -Syu --noconfirm && \ + pacman -S --noconfirm \ + doxygen \ + graphviz && \ + pacman -Scc --noconfirm +WORKDIR /ghostty +COPY include/ ./include/ +COPY images/ ./images/ +COPY dist/doxygen/ ./dist/doxygen/ +COPY example/ ./example/ +COPY Doxyfile ./ +COPY DoxygenLayout.xml ./ +RUN mkdir -p zig-out/share/ghostty/doc/libghostty +RUN doxygen + +#-------------------------------------------------------------------- +# Host the static HTML +#-------------------------------------------------------------------- +FROM nginx:alpine AS runtime + +# Pass build arg to runtime stage +ARG ADD_NOINDEX_HEADER=false +ENV ADD_NOINDEX_HEADER=$ADD_NOINDEX_HEADER + +# Copy documentation and entrypoint script +COPY --from=builder /ghostty/zig-out/share/ghostty/doc/libghostty /usr/share/nginx/html +COPY src/build/docker/lib-c-docs/entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh + +EXPOSE 80 +CMD ["/entrypoint.sh"] diff --git a/vendor/libghostty-vt/src/build/docker/lib-c-docs/entrypoint.sh b/vendor/libghostty-vt/src/build/docker/lib-c-docs/entrypoint.sh new file mode 100755 index 00000000..ac9ca1c0 --- /dev/null +++ b/vendor/libghostty-vt/src/build/docker/lib-c-docs/entrypoint.sh @@ -0,0 +1,32 @@ +#!/bin/sh +if [ "$ADD_NOINDEX_HEADER" = "true" ]; then + cat > /etc/nginx/conf.d/noindex.conf << 'EOF' +server { + listen 80; + location / { + root /usr/share/nginx/html; + index index.html; + etag on; + add_header Cache-Control "no-cache" always; + add_header X-Robots-Tag "noindex, nofollow" always; + add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data:;" always; + } +} +EOF + # Remove default server config + rm -f /etc/nginx/conf.d/default.conf +else + cat > /etc/nginx/conf.d/default.conf << 'EOF' +server { + listen 80; + location / { + root /usr/share/nginx/html; + index index.html; + etag on; + add_header Cache-Control "no-cache" always; + add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data:;" always; + } +} +EOF +fi +exec nginx -g "daemon off;" |
