我试图使用dockerfile安装某些内容。 但是当我运行命令时,我必须回答以下问题:
输入
6
72
我的dockerfile如下所示,但似乎无效。
FROM ubuntu:latest
RUN apt-get update
RUN apt-get install -y expect
RUN apt-get -y install software-properties-common
RUN apt-add-repository ppa:ondrej/php
expect “Press [ENTER] to continue or Ctrl-c to cancel adding it. ” { send “\n” }
RUN apt-get -y install php7.1 php7.1-fpm
expect “Please select the geographic area in which you live. ” { send “6\n” }
expect “Please select the city or region corresponding to your time zone. ” { send “72\n” }
RUN -y apt-get install nginx
有人能告诉我如何在 Dockerfile 中回答安装问题吗?
RUN sudo 8 echo | apt-get install -yq expect
- JPBlanc