Skip to content

Commit a6aa91a

Browse files
committed
Robust handling of /usr/sbin/rm in Dockerfile
Change-Id: I4569ed4b3739332e745f85e681559857979a4f3a
1 parent 85f0cfa commit a6aa91a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ RUN GOARCH=$(echo $TARGETPLATFORM | cut -f2 -d '/') GCE_PD_CSI_STAGING_VERSION=$
2525

2626
# MAD HACKS: Build a version first so we can take the scsi_id bin and put it somewhere else in our real build
2727
FROM k8s.gcr.io/build-image/debian-base:buster-v1.9.0 as mad-hack
28-
RUN ln -s /bin/rm /usr/sbin/rm \
28+
RUN ln -fs /bin/rm /usr/sbin/rm \
2929
&& clean-install udev
3030

3131
# Start from Kubernetes Debian base
3232
FROM k8s.gcr.io/build-image/debian-base:buster-v1.9.0
3333
COPY --from=builder /go/src/sigs.k8s.io/gcp-compute-persistent-disk-csi-driver/bin/gce-pd-csi-driver /gce-pd-csi-driver
3434
# Install necessary dependencies
35-
RUN ln -s /bin/rm /usr/sbin/rm \
35+
RUN ln -fs /bin/rm /usr/sbin/rm \
3636
&& clean-install util-linux e2fsprogs mount ca-certificates udev xfsprogs
3737
COPY --from=mad-hack /lib/udev/scsi_id /lib/udev_containerized/scsi_id
3838

0 commit comments

Comments
 (0)