@@ -24,12 +24,14 @@ ARG BASE_IMAGE=debian:bookworm-slim
24
24
FROM $BASE_IMAGE as base
25
25
26
26
# copy in static files
27
- # all scripts are 0755 (rwx r-x r-x)
27
+ # all scripts and directories are 0755 (rwx r-x r-x)
28
28
# all non-scripts are 0644 (rw- r-- r--)
29
29
COPY --chmod=0755 files/usr/local/bin/* /usr/local/bin/
30
30
31
31
COPY --chmod=0644 files/kind/ /kind/
32
- COPY --chmod=0755 files/kind/bin/* /kind/bin/
32
+ # COPY only applies to files, not the directory itself, so the permissions are
33
+ # fixed in RUN below with a chmod.
34
+ COPY --chmod=0755 files/kind/bin/ /kind/bin/
33
35
34
36
COPY --chmod=0644 files/LICENSES/* /LICENSES/*
35
37
COPY --chmod=0644 files/etc/* /etc/
@@ -42,8 +44,6 @@ COPY --chmod=0644 files/etc/systemd/system/kubelet.service.d/* /etc/systemd/syst
42
44
# Install dependencies, first from apt, then from release tarballs.
43
45
# NOTE: we use one RUN to minimize layers.
44
46
#
45
- # First we must ensure that our util scripts are executable.
46
- #
47
47
# The base image already has a basic userspace + apt but we need to install more packages.
48
48
# Packages installed are broken down into (each on a line):
49
49
# - packages needed to run services (systemd)
@@ -69,7 +69,8 @@ COPY --chmod=0644 files/etc/systemd/system/kubelet.service.d/* /etc/systemd/syst
69
69
# Finally we adjust tempfiles cleanup to be 1 minute after "boot" instead of 15m
70
70
# This is plenty after we've done initial setup for a node, but before we are
71
71
# likely to try to export logs etc.
72
- RUN echo "Installing Packages ..." \
72
+ RUN chmod 755 /kind/bin && \
73
+ echo "Installing Packages ..." \
73
74
&& DEBIAN_FRONTEND=noninteractive clean-install \
74
75
systemd \
75
76
conntrack iptables iproute2 ethtool util-linux mount ebtables kmod \
0 commit comments