diff options
| author | Jeffrey C. Ollie <jeff@ocjtech.us> | 2025-03-17 11:09:47 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-17 11:09:47 -0500 |
| commit | e0fe12cc05ed859bd8bd7fa3993ded341275063f (patch) | |
| tree | 605e10928af27fd9d4dc8607a9e84470dc6d8050 | |
| parent | a2df8e4b869268bc1018400452b698540352bbab (diff) | |
| parent | 1d040dd17d3fbf06a14376504a5a0b6e20d1ebc0 (diff) | |
Update Debian 12 Dockerfile (#6776)
1. Automatically detect the required Zig version rather than using a
hardcoded value.
2. Run `ghostty +version` after the build as a sanity check.
| -rw-r--r-- | .github/workflows/test.yml | 1 | ||||
| -rw-r--r-- | src/build/docker/debian/Dockerfile | 13 |
2 files changed, 9 insertions, 5 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b2f449784..056151373 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -755,4 +755,3 @@ jobs: file: src/build/docker/debian/Dockerfile build-args: | DISTRO_VERSION=12 - ZIG_VERSION=0.14.0 diff --git a/src/build/docker/debian/Dockerfile b/src/build/docker/debian/Dockerfile index 9d9cbbf96..99a20c818 100644 --- a/src/build/docker/debian/Dockerfile +++ b/src/build/docker/debian/Dockerfile @@ -7,6 +7,7 @@ RUN DEBIAN_FRONTEND="noninteractive" apt-get -qq update && \ # Build Tools blueprint-compiler \ build-essential \ + curl \ libbz2-dev \ libonig-dev \ libxml2-utils \ @@ -28,10 +29,12 @@ RUN . /etc/os-release; if [ $VERSION_ID -le 12 ]; then ln -s libbz2.so /usr/lib/ # Install zig # https://ziglang.org/download/ -ARG ZIG_VERSION="0.14.0" -RUN wget -q "https://ziglang.org/download/$ZIG_VERSION/zig-linux-$(uname -m)-$ZIG_VERSION.tar.xz" && \ - tar -xf "zig-linux-$(uname -m)-$ZIG_VERSION.tar.xz" -C /opt && \ - rm zig-linux-* && \ + +COPY ./build.zig /src/build.zig + +RUN export ZIG_VERSION=$(sed -n -e 's/^.*requireZig("\(.*\)").*$/\1/p' /src/build.zig) && curl -L -o /tmp/zig.tar.xz "https://ziglang.org/download/$ZIG_VERSION/zig-linux-$(uname -m)-$ZIG_VERSION.tar.xz" && \ + tar -xf /tmp/zig.tar.xz -C /opt && \ + rm /tmp/zig.tar.xz && \ ln -s "/opt/zig-linux-$(uname -m)-$ZIG_VERSION/zig" /usr/local/bin/zig WORKDIR /src @@ -54,3 +57,5 @@ COPY ./src /src/src # Debian 12 doesn't have gtk4-layer-shell, so we have to manually compile it ourselves RUN zig build -Doptimize=Debug -Dcpu=baseline -Dapp-runtime=gtk -fno-sys=gtk4-layer-shell --system /zig/global-cache/p +RUN ./zig-out/bin/ghostty +version + |
