如何在Docker中安装kerberos客户端? [英] How to install kerberos client in docker?
问题描述
我正尝试在下一个Dockerfile
之前创建Docker
图像.它必须安装Kerberos
客户端.
I am trying to create Docker
image by next Dockerfile
. It must to install Kerberos
client.
Dockerfile :
FROM node:latest
RUN export DEBIAN_FRONTEND=noninteractive
RUN apt-get -qq update
RUN apt-get -qq install krb5-user libpam-krb5
RUN apt-get -qq clean
COPY / ./
EXPOSE 3000
CMD ["npm", "start"]
Dockerfile中的下一个命令RUN apt-get -qq install krb5-user libpam-krb5
要求我输入交互式提示的值,如下所示:
Next command RUN apt-get -qq install krb5-user libpam-krb5
from Dockerfile ask me to enter the value to interactive prompt which looks like:
Default Kerberos version 5 realm:
要点是,即使我输入值并按Enter,该命令也不会终止.怎么了?如何解决?
The point is that the command does not terminate even if I write value and press enter. Whats wrong and how to fix it?
推荐答案
您需要-y
apt参数
FROM node:latest
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -qq update && \
apt-get -yqq install krb5-user libpam-krb5 && \
apt-get -yqq clean
COPY / ./
EXPOSE 3000
CMD ["npm", "start"]
请记住,每个RUN
指令都会在图像中创建一个额外的层,因此减少该指令的数量会很不错.
And remember, that each RUN
directive create one additional layer in the image, so it will be nice to reduce the amount of this directives.
这篇关于如何在Docker中安装kerberos客户端?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!