我正在尝试编写一个Dockerfile
构建一个利用 Databricks Conenect 的容器。RUN
因此,我需要通过 Docker命令设置和安装 Databricks Connect 。我有以下内容:
FROM python:3.8
COPY requirements.txt /tmp/
RUN apt-get update\
&& apt-get install software-properties-common -y\
&& apt-get update\
&& apt-add-repository "deb http://security.debian.org/debian-security stretch/updates main"\
&& apt-get update\
&& apt-get install openjdk-8-jdk -y
RUN pip install --requirement /tmp/requirements.txt\
&& databricks-connect configure\
&& databricks-connect test
作为产生我的问题的简化示例。step:databricks-connect configure
提示使用 default 接受许可N
,因此引发以下错误:
...
#14 1.345 Do you accept the above agreement? [y/N] Traceback (most recent call last):
#14 1.346 File "/usr/local/bin/databricks-connect", line 8, in <module>
#14 1.346 sys.exit(main())
#14 1.346 File "/usr/local/lib/python3.8/site-packages/pyspark/databricks_connect.py", line 281, in main
#14 1.346 configure()
#14 1.346 File "/usr/local/lib/python3.8/site-packages/pyspark/databricks_connect.py", line 119, in configure
#14 1.346 accept = input().strip()
#14 1.346 EOFError: EOF when reading a line
------
executor failed running [/bin/sh -c databricks-connect configure]: exit code: 1
我怎样才能自动接受它作为 Docker 构建的一部分?