-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Closed
Labels
Description
What would you like to be added?
Follow up to #13556
Currently we generate images based on:
FROM --platform=linux/s390x busybox:1.34.1 as source
FROM --platform=linux/s390x gcr.io/distroless/base-debian11
...
RUN mkdir -p /var/etcd/
RUN mkdir -p /var/lib/etcd/
...
RUN echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf
CMD ["/usr/local/bin/etcd"]
Seems that:
- We can use https://docs.docker.com/engine/reference/builder/#workdir to get rid of MKDIR
- We can copy the
/etc/nsswitch.conf
to avoid need forecho
and bash redirect syntax (>>
) - I don't see other reasons to keep
/bin/sh
- As etcd is statically compiled, we might not need
base-debian11
image at all
Why is this needed?
To isolate from security and licensing problems.