1

I am trying to build a docker image with postgresql with Ubuntu. When the image is being built during the postgresql installation apt prompts for the config data (e.g. time zone settings), but the terminal emulator does not send a keypress for the apt's prompt. How do I either suppress this prompts or send some default values?

Host OS: Windows 10

Dockerfile (meaning strings):

FROM ubuntu:18.04
RUN apt-get update -y
RUN apt-get install -y  python3-pip python-dev build-essential postgresql-server-dev-10 postgresql
RUN pip3 install -r requirements.txt
Ivan
  • 55
  • 7
  • 2
    Apart from that, you should follow the [best practices](https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#minimize-the-number-of-layers) and run all those commands in a single `RUN` command to minimize the number of layers. – Gerald Schneider Aug 10 '20 at 09:52
  • Thank you, the provides solution from comments above works fine. – Ivan Aug 10 '20 at 10:50

0 Answers0