12

以下命令在 shell 中运行时似乎有效

apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF 

但在 a 中执行时失败Dockerfile,如下所示:

Warning: apt-key output should not be parsed (stdout is not a terminal)
Executing: /tmp/apt-key-gpghome.1CIuj3LUOP/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
gpg: cannot open '/dev/tty': No such device or address

特定的DockerfileRUN 命令在图像上执行,而openjdk:8图像又从buildpack-deps:stretch-scm

4

1 回答 1

16

Solved by adding --no-tty on the apt-key adv command also;

Any idea however why this was happening?

于 2018-11-19T10:39:52.523 回答