https://github.com/etcd-io/etcd
Revision e814f6f78a1213a344038447cd1e48949327b36c authored by Marek Siarkowicz on 15 February 2022, 22:06:52 UTC, committed by GitHub on 15 February 2022, 22:06:52 UTC
2 parent s aa75fd0 + 72c33d8
Raw File
Tip revision: e814f6f78a1213a344038447cd1e48949327b36c authored by Marek Siarkowicz on 15 February 2022, 22:06:52 UTC
Merge pull request #13671 from mrueg/mixin-generate-manifests
Tip revision: e814f6f
Dockerfile-release.amd64
FROM --platform=linux/amd64 busybox:1.34.1 as source
FROM --platform=linux/amd64 gcr.io/distroless/base-debian11

COPY --from=source /bin/sh /bin/sh
COPY --from=source /bin/mkdir /bin/mkdir

ADD etcd /usr/local/bin/
ADD etcdctl /usr/local/bin/
ADD etcdutl /usr/local/bin/
RUN mkdir -p /var/etcd/
RUN mkdir -p /var/lib/etcd/

# Alpine Linux doesn't use pam, which means that there is no /etc/nsswitch.conf,
# but Golang relies on /etc/nsswitch.conf to check the order of DNS resolving
# (see https://github.com/golang/go/commit/9dee7771f561cf6aee081c0af6658cc81fac3918)
# To fix this we just create /etc/nsswitch.conf and add the following line:
RUN echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf

EXPOSE 2379 2380

# Define default command.
CMD ["/usr/local/bin/etcd"]
back to top