Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by gbr-app-1.alpinelinux.org (Postfix) with ESMTPS id 3BC8D2236E5 for <~alpine/users@lists.alpinelinux.org>; Wed, 1 Feb 2023 13:13:00 +0000 (UTC) Received: by mail-lf1-x12c.google.com with SMTP id o20so29219433lfk.5 for <~alpine/users@lists.alpinelinux.org>; Wed, 01 Feb 2023 05:13:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bell-sw-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=oNoJJ1+gDHbzq8dzR4rTNcnlIyMNRM7BN/NRHTKrGuI=; b=6efPA17TULUUnkGPneLW+m+Hj8oPESSK8L0umnfzZv85L+vmr53S+t15+UQld9YI/5 RLuj5b3C3nCNWnIq6uFXJ1vXQdU7teslFfzZd3RVMS8yBm0y4aHIK1g4EZncOIRFTXFg Y8/Z8bd47Sr3galSwEEVHOdbY1yjH4of1+XbQT9L97D7XAp5oeZCKY6HZHZEReEJgFaN JWVcm6n8rtChbFUbntpK7+z4VeJpeLJy1Vw1oxqzwDswZq89+kUJrMds6to58devEB0g tQYMcKKA5OiDoQCa6U0AiMz7fL03+k+lwshcG7yvYd9Iejf9hF67UHypJkuGJ534BkJp bGEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=oNoJJ1+gDHbzq8dzR4rTNcnlIyMNRM7BN/NRHTKrGuI=; b=r7FTlBQnQMz6Ia5+ejfuMhTBJyEAPfKDT3lzLPKTXgqnEqVaibgmcFp1ouiMI+5g1j F6FkfB0fZUt5pn2dlk8NpNopb0Dk6oDdetnML7/vjiH3HUOl26wDGEKgM1U8YaSFE0ia ZPaGkrM0eCtzQOvFaWm6BddnNz1VodYNdgL0KpA3XyGzL0umjsb2sHJAcYPBtrm39JJp 4zvxXmUPXIEXvaJb6u3AijHZ8u/nepCpWSrm9gXg62dgZcriEP7oyPosCQjjjU9Ixw6l NJPhAjPpGUengK1Lg9wnxC7iOvTx2xr8QeXAymPfRclj6jcQ0H/7VaFH4+PVP15Dj6Y/ 9s8g== X-Gm-Message-State: AO0yUKXB26j6XWl/8G8GhrTPUi6BKFzTdGeKiSStNqRc3zRFkFU9WtOH 256+pa+H7aMH0Wmb21YF8eWzsQ== X-Google-Smtp-Source: AK7set8IgotUgdnvgapkCLNZrQcna/zEhq5A8HF/Io07O5FyssXocdfCR0YLiLC7RoCEScg5otSaTQ== X-Received: by 2002:ac2:55b6:0:b0:4cc:58b9:117a with SMTP id y22-20020ac255b6000000b004cc58b9117amr1420278lfg.36.1675257177444; Wed, 01 Feb 2023 05:12:57 -0800 (PST) Received: from [192.168.88.231] ([37.153.11.115]) by smtp.gmail.com with ESMTPSA id v29-20020ac25b1d000000b004946b549a19sm682249lfn.45.2023.02.01.05.12.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Feb 2023 05:12:55 -0800 (PST) Message-ID: <469f059e-969c-444b-6cd3-4b7646e63f77@bell-sw.com> Date: Wed, 1 Feb 2023 16:12:53 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: Font dependencies in Alpine Linux Content-Language: en-US To: alice , ~alpine/users@lists.alpinelinux.org References: <59c4dca8-5cd0-1a7f-043f-924448927ece@bell-sw.com> From: Alexander Scherbatiy In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2/1/23 15:38, alice wrote: > On Wed Feb 1, 2023 at 12:43 PM CET, Alexander Scherbatiy wrote: >> Hello, >> >> If I install dejavu fonts on systems ubuntu:20.04, fedora:35, >> opensuse/leap:15.4 in docker they do not install fontconfig and freetype >> as dependencies. >> >> DejaVu fonts have dependencies on fontconfig and freetype libraries on >> Linux Alpine . >> >> --------- >> >> docker run -it alpine:3.17 ash >> / # apk update >> / # apk add font-dejavu >> (1/10) Installing libexpat (2.5.0-r0) >> (2/10) Installing brotli-libs (1.0.9-r9) >> (3/10) Installing libbz2 (1.0.8-r4) >> (4/10) Installing libpng (1.6.38-r0) >> (5/10) Installing freetype (2.12.1-r0) >> (6/10) Installing fontconfig (2.14.1-r0) >> (7/10) Installing encodings (1.0.6-r0) >> (8/10) Installing libfontenc (1.1.6-r0) >> (9/10) Installing mkfontscale (1.2.2-r1) >> (10/10) Installing font-dejavu (2.37-r3) >> Executing busybox-1.35.0-r29.trigger >> Executing fontconfig-2.14.1-r0.trigger >> Executing mkfontscale-1.2.2-r1.trigger >> OK: 28 MiB in 25 packages >> --------- >> >> The use case which I have is using a docker with Linux Alpine to >> generate reports with Java in headless mode. >> Java allows to use fonts on systems where the fontconfig is not >> installed by providing paths to fonts in /lib/fontconfig.properties >> file. >> Java also can be built with bundled freetype which is a subset of the >> full freetype library. > freetype is merely a dependency of fontconfig in this case > >> >> Is it necessary that fonts have dependencies on fontconfig and freetype >> libraries in Alpine Linux? > yes, as normally using the fonts generally requires it. > > i suppose it's not impossible to not depend on it paired with any fonts > directly, but strictly speaking there is generally no difference, except in > your special usecase. you'd probably say the same goes for mkfontscale?   Yes. The general question is that fonts on Alpine Linux has more dependencies than fonts on other systems.   For example, if I use ubuntu:20.04, dejavu fonts depend only on fonts-dejavu-core and fonts-dejavu-extra  ---------  docker run -it ubuntu:20.04 bash  apt update  apt install fonts-dejavu Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed:   fonts-dejavu-core fonts-dejavu-extra The following NEW packages will be installed:   fonts-dejavu fonts-dejavu-core fonts-dejavu-extra 0 upgraded, 3 newly installed, 0 to remove and 4 not upgraded. Need to get 2996 kB of archives. After this operation, 10.5 MB of additional disk space will be used. --------- The aim is to use a docker image with Java as small as possible. What is the right way to setup Alpine Linux docker with fonts and without additional dependencies for my use case? My be fonts can be just copied during docker image creation instead of just font installation from packages? Thanks, Alexander. > >> Thanks, >> Alexander.