File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,25 @@ FROM builder-${TARGETARCH} AS builder
3333
3434# #######################
3535
36- FROM ${BASE_IMAGE} AS container-fat
36+ FROM ${BASE_IMAGE} AS base-updated
37+ RUN <<EOF
38+ apt-get update
39+ apt-get upgrade -y
40+ apt-get clean -y
41+ rm -rf \
42+ /var/cache/debconf/* \
43+ /var/lib/apt/lists/* \
44+ /var/log/* \
45+ /tmp/* \
46+ /var/tmp/*
47+ EOF
48+
49+ FROM scratch AS base
50+ COPY --from=base-updated / /
51+
52+ # #######################
53+
54+ FROM base AS container-fat
3755
3856ARG SLIM_PACKAGES
3957RUN clean-install \
@@ -62,7 +80,7 @@ ENTRYPOINT ["/usr/local/bin/kubelet"]
6280
6381# #######################
6482
65- FROM ${BASE_IMAGE} AS container-slim
83+ FROM base AS container-slim
6684
6785ARG SLIM_PACKAGES
6886RUN clean-install \
You can’t perform that action at this time.
0 commit comments