Improve Dockerfile consistency with curly braces

This commit is contained in:
Joe Groocock 2017-08-02 22:28:58 +01:00
parent e2e3c35ef9
commit edf9d6ab29

View File

@ -19,12 +19,12 @@ RUN apt-get update -qy && \
ln -sv lib lib64
# Pull busybox and some other utilities
RUN curl -L https://busybox.net/downloads/binaries/$BUSYB_VER-defconfig-multiarch/busybox-$ARCH > bin/busybox && \
RUN curl -L https://busybox.net/downloads/binaries/${BUSYB_VER}-defconfig-multiarch/busybox-${ARCH} > bin/busybox && \
curl -L https://github.com/javabean/su-exec/releases/download/${SU_EXEC_VER}/su-exec.amd64 > sbin/su-exec && \
curl -L https://github.com/krallin/tini/releases/download/${TINI_VER}/tini-amd64 > sbin/tini && \
chmod +x bin/busybox sbin/su-exec sbin/tini && \
# "Install" busybox, creating symlinks to all binaries it provides
bin/busybox --list-full | xargs -i ln -s /bin/busybox "$PREFIX/{}"
bin/busybox --list-full | xargs -i ln -s /bin/busybox "${PREFIX}/{}"
WORKDIR /tmp
@ -32,7 +32,7 @@ ARG CFLAGS="-Os -pipe -fstack-protector-strong"
ARG LDFLAGS="-Wl,-O1,--sort-common -Wl,-s"
# Download and build glibc from source
RUN curl -L https://ftp.gnu.org/gnu/glibc/glibc-$GLIBC_VER.tar.xz | tar xJ && \
RUN curl -L https://ftp.gnu.org/gnu/glibc/glibc-${GLIBC_VER}.tar.xz | tar xJ && \
mkdir -p glibc-build && cd glibc-build && \
\
echo "slibdir=/lib" >> configparms && \
@ -44,7 +44,7 @@ RUN curl -L https://ftp.gnu.org/gnu/glibc/glibc-$GLIBC_VER.tar.xz | tar xJ && \
rm -rf /usr/include/x86_64-linux-gnu/c++ && \
ln -s /usr/include/x86_64-linux-gnu/* /usr/include && \
\
../glibc-$GLIBC_VER/configure \
../glibc-${GLIBC_VER}/configure \
--prefix="$(pwd)/root" \
--libdir="$(pwd)/root/lib" \
--libexecdir=/lib \
@ -62,9 +62,9 @@ RUN curl -L https://ftp.gnu.org/gnu/glibc/glibc-$GLIBC_VER.tar.xz | tar xJ && \
make && make install_root=$(pwd)/out install
# Copy glibc libs & generate ld cache
RUN cp -d glibc-build/out/lib/*.so "$PREFIX/lib" && \
echo '/usr/lib' > "$PREFIX/etc/ld.so.conf" && \
ldconfig -r "$PREFIX"
RUN cp -d glibc-build/out/lib/*.so "${PREFIX}/lib" && \
echo '/usr/lib' > "${PREFIX}/etc/ld.so.conf" && \
ldconfig -r "${PREFIX}"
WORKDIR $PREFIX