构建自定义Dockerfile映像时禁用用户提示

时间:2019-05-16 15:04:05

标签: docker ubuntu dockerfile apt

我正在尝试在构建 Dockerfile映像时避免用户提示挂起。


docker build .

这是构建图像时的实际屏幕截图

enter image description here

这是Dockerfile

FROM ubuntu:latest

LABEL mantainer="mrk088"
LABEL description="Arachni Docker image"

RUN apt-get update
RUN apt-get install -y build-essential curl libcurl4 libcurl4-openssl-dev ruby-full gem
RUN gem update --system

RUN gem install arachni

# Run Arachni Web UI
CMD chmod +x /opt/arachni-ui-web/bin/arachni && /opt/arachni-ui-web/bin/./arachni


EXPOSE 8080/tcp

ENTRYPOINT ["/bin/echo", "Running Arachni Web UI..."]

有人知道如何禁用它吗?

1 个答案:

答案 0 :(得分:2)

您需要告诉debian您处于非交互设置。

-y

还向apt-get添加了CREATE PROCEDURE main.loadData @filepath varchar(200) AS BEGIN Declare @script as varchar(max) Set @script=' DECLARE @jsonVariable NVARCHAR(max); SELECT @jsonVariable = BulkColumn FROM OPENROWSET (BULK ''' + @filepath + ''', SINGLE_CLOB) as j; INSERT INTO main.jsonData(restaurant, priceRange, country, score, reviewDate) SELECT * FROM OPENJSON(@jsonVariable, ''$.reviews.row'') WITH ( restaurant VARCHAR(100) ''$.restaurant'', priceRange VARCHAR(50) ''$.priceRange'', country VARCHAR(50) ''$.country'', score INTEGER ''$.score'', reviewDate DATETIME ''$.reviewDate'' );' Exec(@script) END; GO ,以便它不要求确认。