1FROM k8s.gcr.io/debian-base:v1.0.0 2 3ADD etcd /usr/local/bin/ 4ADD etcdctl /usr/local/bin/ 5RUN mkdir -p /var/etcd/ 6RUN mkdir -p /var/lib/etcd/ 7 8# Alpine Linux doesn't use pam, which means that there is no /etc/nsswitch.conf, 9# but Golang relies on /etc/nsswitch.conf to check the order of DNS resolving 10# (see https://github.com/golang/go/commit/9dee7771f561cf6aee081c0af6658cc81fac3918) 11# To fix this we just create /etc/nsswitch.conf and add the following line: 12RUN echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf 13 14EXPOSE 2379 2380 15 16# Define default command. 17CMD ["/usr/local/bin/etcd"] 18