Solution when building Docker image stops at time zone selection

trouble

If you are making a docker image from 0 and have various packages installed During the build, the time zone option was displayed and I couldn't proceed. It doesn't seem to be an error, but ...

Event

The message displayed in the terminal is as follows:

Please select the geographic area in which you live. Subsequent configuration
questions will narrow this down by presenting a list of cities, representing
the time zones in which they are located.

  1. Africa      4. Australia  7. Atlantic  10. Pacific  13. Etc
  2. America     5. Arctic     8. Europe    11. SystemV
  3. Antarctica  6. Asia       9. Indian    12. US
Geographic area: 

Even if I press a number or press the Enter key, it doesn't move forward.

Solutions

Execute the DEBIAN_FRONTED setting next before the git install command.

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update \
    && apt-get -y install git

Summary

When you do apt-get install on git in dockerfile Let's set DEBIAN_FRONTED = noninteractive first.

Recommended Posts

Solution when building Docker image stops at time zone selection
When building docker image with GitLab CI, wait until docker daemon starts
Image flew when updating Docker with WSL2