Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Distroless as base image #13556

Merged
merged 2 commits into from
Jan 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG-3.6.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,8 @@ See [List of metrics](https://etcd.io/docs/latest/metrics/) for all metrics per

- Add [`etcd_disk_defrag_inflight`](https://github.com/etcd-io/etcd/pull/13371).

### Other

- Use Distroless as base image to make the image less vulnerable and reduce image size.

<hr>
7 changes: 5 additions & 2 deletions Dockerfile-release.amd64
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# base image source: https://git.k8s.io/release/images/build/debian-base
FROM --platform=linux/amd64 k8s.gcr.io/build-image/debian-base:bullseye-v1.1.0
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/
Expand Down
7 changes: 5 additions & 2 deletions Dockerfile-release.arm64
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# base image source: https://git.k8s.io/release/images/build/debian-base
FROM --platform=linux/arm64 k8s.gcr.io/build-image/debian-base:bullseye-v1.1.0
FROM --platform=linux/arm64 busybox:1.34.1 as source
FROM --platform=linux/arm64 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/
Expand Down
7 changes: 5 additions & 2 deletions Dockerfile-release.ppc64le
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# base image source: https://git.k8s.io/release/images/build/debian-base
FROM --platform=linux/ppc64le k8s.gcr.io/build-image/debian-base:bullseye-v1.1.0
FROM --platform=linux/ppc64le busybox:1.34.1 as source
FROM --platform=linux/ppc64le 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/
Expand Down
8 changes: 6 additions & 2 deletions Dockerfile-release.s390x
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# base image source: https://git.k8s.io/release/images/build/debian-base
FROM --platform=linux/s390x k8s.gcr.io/build-image/debian-base:bullseye-v1.1.0
FROM --platform=linux/s390x busybox:1.34.1 as source
FROM --platform=linux/s390x 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/
Expand Down