From e5eee5661f2bae831fc2c525e74f8c8839b1485f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristram=20Gr=C3=A4bener?= Date: Tue, 18 Feb 2025 13:39:29 +0100 Subject: [PATCH] editoast: fix glyph generation on docker on mac-arm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tristram Gräbener Signed-off-by: Florian Amsallem --- editoast/Dockerfile | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/editoast/Dockerfile b/editoast/Dockerfile index 503e50e4912..2b399be2e28 100644 --- a/editoast/Dockerfile +++ b/editoast/Dockerfile @@ -18,17 +18,16 @@ FROM chef AS base_builder RUN apk add --no-cache build-base openssl openssl-dev openssl-libs-static mold libpq-dev geos-dev ENV RUSTFLAGS="-C target-feature=-crt-static -C link-arg=-fuse-ld=mold" RUN cargo install diesel_cli --no-default-features --features postgres -COPY --from=static_assets . /assets +COPY --from=static_assets . /assets ####################### # Build assets # ####################### -FROM ubuntu:latest AS editoast_assets -RUN apt update && apt install --yes wget -RUN wget https://github.com/flother/spreet/releases/download/v0.11.0/spreet-x86_64-unknown-linux-musl.tar.gz -RUN tar xvf spreet-x86_64-unknown-linux-musl.tar.gz --directory /usr/bin -RUN wget http://github.com/stadiamaps/sdf_font_tools/releases/download/cli-v1.4.2/build_pbf_glyphs.x86_64-unknown-linux-gnu -O /usr/bin/build_pbf_glyphs -RUN chmod +x /usr/bin/build_pbf_glyphs +FROM chef AS editoast_assets +# build_pbf_glyphs requires a c++ compiler +RUN apk --no-cache add build-base +RUN cargo install spreet +RUN cargo install build_pbf_glyphs COPY ./assets /assets RUN /assets/sprites/generate-atlas.sh RUN /assets/fonts/generate-glyphs.sh