如何在Docker中安装kerberos客户端? [英] How to install kerberos client in docker?

查看:715
本文介绍了如何在Docker中安装kerberos客户端?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正尝试在下一个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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆