Add msfonts caching to avoid install issues

This commit is contained in:
Vladimir Ischenko
2025-11-11 15:10:51 +03:00
committed by Alexey Golubev
parent 32b11818cc
commit b13570f221
2 changed files with 18 additions and 1 deletions

View File

@ -106,6 +106,22 @@ jobs:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Prepare fonts cache
id: fonts
uses: actions/cache@v4
with:
path: fonts
key: fonts-${{ runner.os }}-v1
- name: Install fonts if not cached
if: steps.fonts.outputs.cache-hit != 'true'
run: |
sudo apt-get update
echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true" | sudo debconf-set-selections
sudo apt-get install -y ttf-mscorefonts-installer
mkdir -p fonts/msttcorefonts
cp -a /usr/share/fonts/truetype/msttcorefonts/* fonts/msttcorefonts/
- name: Build 4testing
id: build-ds
env:

View File

@ -22,6 +22,7 @@ ENV OC_DOWNLOAD_URL=https://download.oracle.com/otn_software/linux/instantclient
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive PG_VERSION=${PG_VERSION} BASE_VERSION=${BASE_VERSION}
ARG ONLYOFFICE_VALUE=onlyoffice
COPY fonts/ /usr/share/fonts/truetype/
RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
apt-get -y update && \
@ -74,7 +75,7 @@ RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
xxd \
zlib1g || dpkg --configure -a && \
# Added dpkg --configure -a to handle installation issues with rabbitmq-server on arm64 architecture
if [ $(ls -l /usr/share/fonts/truetype/msttcorefonts | wc -l) -ne 61 ]; \
if [ $(find /usr/share/fonts/truetype/msttcorefonts -maxdepth 1 -type f -iname '*.ttf' | wc -l) -lt 30 ]; \
then echo 'msttcorefonts failed to download'; exit 1; fi && \
echo "SERVER_ADDITIONAL_ERL_ARGS=\"+S 1:1\"" | tee -a /etc/rabbitmq/rabbitmq-env.conf && \
sed -i "s/bind .*/bind 127.0.0.1/g" /etc/redis/redis.conf && \