Skip to content

Commit

Permalink
Use busybox from alpine
Browse files Browse the repository at this point in the history
Signed-off-by: Liam Newman <[email protected]>
  • Loading branch information
liam-verta committed Oct 19, 2022
1 parent 915c856 commit 67a9d1a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions glibc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,19 @@ RUN set -x \
fi; \
done

FROM ${ARCH}alpine:latest as alpine

FROM ${ARCH}busybox:glibc
MAINTAINER The Prometheus Authors <[email protected]>

# Use the busybox executable from alpine which is generally patched more quickly for vulnerabilities
COPY --from=alpine /bin/busybox /tmp/busybox
COPY --from=alpine /lib/ld-musl* /lib/libc.musl* /lib/

RUN cd /lib && \
ln -sf $(ls ld-musl*) $(ls libc.musl*) && \
rm /bin/* && \
/tmp/busybox --install /bin && \
mv /tmp/busybox /bin/

COPY --from=0 /rootfs /
12 changes: 12 additions & 0 deletions uclibc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,19 @@ RUN set -x \
fi; \
done

FROM ${ARCH}alpine:latest as alpine

FROM ${ARCH}busybox:uclibc
MAINTAINER The Prometheus Authors <[email protected]>

# Use the busybox executable from alpine which is generally patched more quickly for vulnerabilities
COPY --from=alpine /bin/busybox /tmp/busybox
COPY --from=alpine /lib/ld-musl* /lib/libc.musl* /lib/

RUN cd /lib && \
ln -sf $(ls ld-musl*) $(ls libc.musl*) && \
rm /bin/* && \
/tmp/busybox --install /bin && \
mv /tmp/busybox /bin/

COPY --from=0 /rootfs /

0 comments on commit 67a9d1a

Please sign in to comment.