blob: 736445fcc5733d43f0f58bb81a05ace54d37c5f2 [file] [log] [blame]
khenaidooffe076b2019-01-15 16:08:08 -05001FROM alpine:latest
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"]