Skip to content
Snippets Groups Projects
Verified Commit d323915a authored by Dominic Meiser's avatar Dominic Meiser
Browse files

install fonts in docker

parent 0de4f353
No related branches found
No related tags found
No related merge requests found
FROM alpine AS builder FROM alpine:3.19 AS builder
RUN apk add --no-cache cargo RUN apk add --no-cache cargo
...@@ -10,13 +10,14 @@ RUN cargo build --release --no-default-features ...@@ -10,13 +10,14 @@ RUN cargo build --release --no-default-features
# ############################################## # ##############################################
FROM alpine FROM alpine:3.19
ARG ffmpeg_ver=7.0 ARG ffmpeg_ver=7.0
RUN apk add --no-cache \ RUN apk add --no-cache \
dav1d fontconfig freetype harfbuzz librsvg libva lilv-libs opus svt-av1 x264-libs x265 \ dav1d fontconfig freetype harfbuzz librsvg libva lilv-libs opus svt-av1 x264-libs x265 \
inkscape libgcc \ font-noto inkscape libarchive-tools libgcc \
# we install ffmpeg ourselves to get libsvtav1 support which is not part of the alpine package \
&& apk add --no-cache --virtual .build-deps \ && apk add --no-cache --virtual .build-deps \
build-base \ build-base \
dav1d-dev fontconfig-dev freetype-dev harfbuzz-dev librsvg-dev libva-dev lilv-dev opus-dev svt-av1-dev x264-dev x265-dev \ dav1d-dev fontconfig-dev freetype-dev harfbuzz-dev librsvg-dev libva-dev lilv-dev opus-dev svt-av1-dev x264-dev x265-dev \
...@@ -52,7 +53,16 @@ RUN apk add --no-cache \ ...@@ -52,7 +53,16 @@ RUN apk add --no-cache \
&& make -j$(nproc) install \ && make -j$(nproc) install \
&& apk del --no-cache .build-deps \ && apk del --no-cache .build-deps \
&& cd .. \ && cd .. \
&& rm -r ffmpeg-${ffmpeg_ver} ffmpeg-${ffmpeg_ver}.tar.bz2 && rm -r ffmpeg-${ffmpeg_ver} ffmpeg-${ffmpeg_ver}.tar.bz2 \
# we need Arial Black for the VideoAG logo \
&& wget -q https://www.freedesktop.org/software/fontconfig/webfonts/webfonts.tar.gz \
&& tar xfa webfonts.tar.gz \
&& cd msfonts \
&& for file in *.exe; do bsdtar xf "$file"; done \
&& install -Dm644 -t /usr/share/fonts/msfonts/ *.ttf *.TTF \
&& install -Dm644 -t /usr/share/licenses/msfonts/ Licen.TXT \
&& cd .. \
&& rm -r msfonts webfonts.tar.gz
COPY --from=builder /src/target/release/render_video /usr/local/bin/render_video COPY --from=builder /src/target/release/render_video /usr/local/bin/render_video
ENTRYPOINT ["/usr/local/bin/render_video"] ENTRYPOINT ["/usr/local/bin/render_video"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment