1

I am using Ubuntu 18 and trying to install PHP using command

apt-get install -y php

But during installation, It asks for geographic area and city, so I need to manually input these 2 things.

Since I am preparing commands for Dockerfile, so I am trying to mention all inputs in command itself but not getting way, so is there any way that I can append multiple inputs to my command?

Jass
  • 3,345
  • 3
  • 24
  • 41
  • Does this answer your question? [Using Bash Script to feed input to command line](https://stackoverflow.com/questions/23174849/using-bash-script-to-feed-input-to-command-line) – Battleman Dec 28 '21 at 08:06

2 Answers2

0

You can add in your Dockerfile


ENV DEBIAN_FRONTEND=noninteractive

Here's the link where i find the solution

Nabil
  • 1,130
  • 5
  • 11
0

Try this below command for installing PHP:

sudo apt install php

As far as I know, running with sudo may help u in installing php easily.