Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install kerberos client in docker?

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?

like image 733
Nurzhan Nogerbek Avatar asked Apr 08 '19 11:04

Nurzhan Nogerbek


People also ask

What is Kerberos Docker?

Kerberos/Docker is a project to run easily a MIT Kerberos V5 architecture in a cluster of docker containers. It is really useful for running integration tests of project using Kerberos or for learning and testing Kerberos solution and administration.


1 Answers

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.

like image 154
sergkondr Avatar answered Nov 15 '22 05:11

sergkondr