Fix for busybox symlinks

This commit is contained in:
Adam Dodman 2017-05-12 00:34:57 +01:00
parent 5833b66d7c
commit 96cb6621b9

View File

@ -21,16 +21,15 @@ RUN for pkg in $PACKAGES; do \
name=$(echo $pkg | cut -d/ -f2); \ name=$(echo $pkg | cut -d/ -f2); \
curl -L https://archlinux.org/packages/$repo/$ARCH/$name/download \ curl -L https://archlinux.org/packages/$repo/$ARCH/$name/download \
| tar xJ -C . ; \ | tar xJ -C . ; \
done done && \
# Pull and install busybox binaries
RUN curl -L https://busybox.net/downloads/binaries/1.26.2-defconfig-multiarch/busybox-$ARCH > /output/usr/bin/busybox && \
chmod +x /output/bin/busybox && \
/output/bin/busybox --install -s /output/bin && \
rm -f .BUILDINFO .INSTALL .PKGINFO .MTREE && \ rm -f .BUILDINFO .INSTALL .PKGINFO .MTREE && \
rm -rf usr/share usr/include lib/*.a lib/*.o lib/gconv \ rm -rf usr/share usr/include lib/*.a lib/*.o lib/gconv \
bin/ldconfig bin/sln bin/localedef bin/nscd bin/ldconfig bin/sln bin/localedef bin/nscd
# Pull and install busybox binaries
RUN curl -L https://busybox.net/downloads/binaries/1.26.2-defconfig-multiarch/busybox-$ARCH > /output/usr/bin/busybox && \
chmod +x /output/bin/busybox
WORKDIR /tmp WORKDIR /tmp
# Build and install openssl # Build and install openssl
@ -47,4 +46,6 @@ RUN curl -L https://www.openssl.org/source/openssl-1.1.0e.tar.gz | \
FROM scratch FROM scratch
WORKDIR / WORKDIR /
COPY --from=builder /output/ / COPY --from=builder /output/ /
# Needed cos we dont have /bin/sh yet
RUN ["/bin/busybox", "--install", "-s", "/bin"]
CMD ["sh"] CMD ["sh"]