30 lines
1.6 KiB
Docker
30 lines
1.6 KiB
Docker
# CI image for the `build` job (.gitea/workflows/build.yml): the Flutter image
|
|
# plus node (actions/cache is a JS action; the image has node 18 only) and
|
|
# fixed paths for the Gradle and pub caches.
|
|
#
|
|
# Deliberately thin. The big downloads - the Android SDK packages Gradle
|
|
# auto-installs (two NDKs, CMake, ~4 min) and Gradle's dependencies - are
|
|
# restored by actions/cache, whose store is on the runner's disk. Baking the
|
|
# NDKs in made a 14 G image in the runner's 48 G RAM-backed image store
|
|
# (grg-runner); its cleanup evicts such images under pressure, so it would be
|
|
# rebuilt most runs, and on 2026-10-26 it filled the store (Gradle: "No space
|
|
# left on device").
|
|
#
|
|
# Built by the `ci-image` job, tagged by a hash of this file, into the local
|
|
# Docker of the `big` runner; a Renovate bump of either base digest rebuilds
|
|
# it (seconds - only node is added on top of the Flutter image).
|
|
FROM node:26-trixie-slim@sha256:e4db4c914bf8ad241bd24804fc25d272d89bad97e68cdc8a1414862790a02c39 AS node
|
|
|
|
FROM ghcr.io/cirruslabs/flutter:stable@sha256:46691e311715845de03a3ba4753a475476936805b29431b1f00f1816981033f8
|
|
|
|
COPY --from=node /usr/local/bin/node /usr/local/bin/node
|
|
|
|
# Fixed cache paths: the build job restores/saves exactly these (HOME inside
|
|
# a job container is not reliably /root, and Gradle takes its home from
|
|
# passwd, not $HOME). Gradle's build cache lives in there too.
|
|
ENV GRADLE_USER_HOME=/ci-cache/gradle \
|
|
PUB_CACHE=/ci-cache/pub
|
|
RUN mkdir -p "$GRADLE_USER_HOME" "$PUB_CACHE" \
|
|
&& echo 'org.gradle.caching=true' >"$GRADLE_USER_HOME/gradle.properties" \
|
|
&& node --version
|