docker: update node build to not copy executables (#2075)

Refs: #2073

Since the stuff under /bin might not have the right libraries to run,
don't copy it. This is not a general purpose operating system image
and is meant to be minimal.
This commit is contained in:
Jeff Schroeder 2022-12-06 11:35:16 -05:00 committed by GitHub
parent 54194b1f64
commit 8ed35ddac1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -31,10 +31,12 @@ FROM scratch as export
# guardiand can't (easily) be statically linked due to the C dependencies, so we
# have to copy all the dynamic libraries
COPY --from=build /bin/* /bin/
COPY --from=build /lib/* /lib/
COPY --from=build /lib64/* /lib64/
# Copy the shells as entrypoints, but no utilities are necessary
COPY --from=build /bin/bash /bin/dash /bin/sh /bin/
# finally copy the guardian executable
COPY --from=build /guardiand .