Dockerfile-release 623 B

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