How to install kerberos client in docker?

笑着哭i 提交于 2021-01-22 07:07:33

问题


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"]

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: 

The point is that the command does not terminate even if I write value and press enter. Whats wrong and how to fix it?


回答1:


You need a -y parameter for 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"]

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.



来源:https://stackoverflow.com/questions/55572477/how-to-install-kerberos-client-in-docker

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!