Include nsswitch so golang will read /etc/hosts file in docker container

This commit is contained in:
Darren Shepherd 2019-11-11 22:16:18 +00:00
parent 561bc96049
commit 24fa3785a4

View File

@ -9,6 +9,8 @@ RUN cd image/bin && \
FROM scratch
COPY --from=base /image /
RUN mkdir -p /etc && \
echo 'hosts: files dns' > /etc/nsswitch.conf
RUN chmod 1777 /tmp
VOLUME /var/lib/kubelet
VOLUME /var/lib/rancher/k3s