Skip to content

How to inject bash code during image generation? #94

@carlos-lopez-tecnativa

Description

@carlos-lopez-tecnativa

In one of our modules, we need to install libraries such as openjdk-8-jdk and ttf-mscorefonts-installer.
We can declare them in the module’s manifest as external_dependencies, and they are installed as expected:
https://github.com/Tecnativa/l10n-spain/blob/facac59b25fea962db8cc78aaba34447dd8b8b7c/l10n_es_atc_mod420/__manifest__.py#L13C6-L14

The problem is that the package ttf-mscorefonts-installer requires license acceptance, and it seems this is not happening properly.
In Runboat, we see this log:

mscorefonts-eula license could not be presented
try 'dpkg-reconfigure debconf' to select a frontend other than noninteractive

user did not accept the mscorefonts-eula license

My question is: how can we inject customizable parameters into the Docker image during build time?
In this specific case, we would need to run the following command before the installation:

echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true" | debconf-set-selections

Any ideas?

CC @sbidoul @sergio-teruel @pedrobaeza

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions