Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to accept license agreement during docker build?

How to write the Dockerfile that can pass yes to prompting license agreement?

  1. under Dockerfile directory, docker build -t "{user}/{tags}" . then build failed.
  2. docker logs {container id}, show message as below:

    Preparing to unpack .../ttf-mscorefonts-installer_3.4+nmu1ubuntu2_all.deb ...
    debconf: unable to initialize frontend: Dialog
    debconf: (TERM is not set, so the dialog frontend is not usable.)
    debconf: falling back to frontend: Readline
    Configuring ttf-mscorefonts-installer
    
    TrueType core fonts for the Web EULA END-USER LICENSE AGREEMENT FOR 
    MICROSOFT SOFTWARE
    ...
    Do you accept the EULA license terms? [yes/no]
    
like image 347
stackoverYC Avatar asked Dec 19 '22 00:12

stackoverYC


1 Answers

For me, the ACCEPT_EULA=y before the install did the job, like

RUN apt-get update && ACCEPT_EULA=Y apt-get install PACKAGE -y
like image 181
Lucas Carlos Barboza Avatar answered Jan 08 '23 09:01

Lucas Carlos Barboza