Skip to content

Commit

Permalink
Merge pull request #9029 from tstromberg/nsswitch
Browse files Browse the repository at this point in the history
Dockerfile: prioritize /etc/hosts over dns
  • Loading branch information
tstromberg committed Aug 24, 2020
2 parents 2b44c59 + 23285d8 commit 0b135b4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions deploy/kicbase/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ RUN echo 'root:root' |chpasswd
RUN sed -ri 's/^#?PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config

# minikube relies on /etc/hosts for control-plane discovery. This prevents nefarious DNS servers from breaking it.
RUN sed -ri 's/dns files/files dns/g' /etc/nsswitch.conf

EXPOSE 22
# create docker user for minikube ssh. to match VM using "docker" as username
RUN adduser --ingroup docker --disabled-password --gecos '' docker
Expand Down

0 comments on commit 0b135b4

Please sign in to comment.