Skip to content

Commit

Permalink
add /etc/nsswitch.conf in Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
qingkunl authored and aauren committed Jul 27, 2020
1 parent 9c9e935 commit 6af898b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,9 @@ COPY build/image-assets/vimrc /root/.vimrc
COPY build/image-assets/motd-kube-router.sh /etc/motd-kube-router.sh
COPY kube-router gobgp /usr/local/bin/

# Since alpine image doesn't contain /etc/nsswitch.conf, the hosts in /etc/hosts (e.g. localhost)
# cannot be used. So manually add /etc/nsswitch.conf to work around this issue.
RUN echo "hosts: files dns" > /etc/nsswitch.conf

WORKDIR /root
ENTRYPOINT ["/usr/local/bin/kube-router"]

0 comments on commit 6af898b

Please sign in to comment.