Improve Dockerfile consistency with curly braces
This commit is contained in:
parent
e2e3c35ef9
commit
edf9d6ab29
14
Dockerfile
14
Dockerfile
@ -19,12 +19,12 @@ RUN apt-get update -qy && \
|
|||||||
ln -sv lib lib64
|
ln -sv lib lib64
|
||||||
|
|
||||||
# Pull busybox and some other utilities
|
# 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/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 && \
|
curl -L https://github.com/krallin/tini/releases/download/${TINI_VER}/tini-amd64 > sbin/tini && \
|
||||||
chmod +x bin/busybox sbin/su-exec sbin/tini && \
|
chmod +x bin/busybox sbin/su-exec sbin/tini && \
|
||||||
# "Install" busybox, creating symlinks to all binaries it provides
|
# "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
|
WORKDIR /tmp
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ ARG CFLAGS="-Os -pipe -fstack-protector-strong"
|
|||||||
ARG LDFLAGS="-Wl,-O1,--sort-common -Wl,-s"
|
ARG LDFLAGS="-Wl,-O1,--sort-common -Wl,-s"
|
||||||
|
|
||||||
# Download and build glibc from source
|
# 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 && \
|
mkdir -p glibc-build && cd glibc-build && \
|
||||||
\
|
\
|
||||||
echo "slibdir=/lib" >> configparms && \
|
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++ && \
|
rm -rf /usr/include/x86_64-linux-gnu/c++ && \
|
||||||
ln -s /usr/include/x86_64-linux-gnu/* /usr/include && \
|
ln -s /usr/include/x86_64-linux-gnu/* /usr/include && \
|
||||||
\
|
\
|
||||||
../glibc-$GLIBC_VER/configure \
|
../glibc-${GLIBC_VER}/configure \
|
||||||
--prefix="$(pwd)/root" \
|
--prefix="$(pwd)/root" \
|
||||||
--libdir="$(pwd)/root/lib" \
|
--libdir="$(pwd)/root/lib" \
|
||||||
--libexecdir=/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
|
make && make install_root=$(pwd)/out install
|
||||||
|
|
||||||
# Copy glibc libs & generate ld cache
|
# Copy glibc libs & generate ld cache
|
||||||
RUN cp -d glibc-build/out/lib/*.so "$PREFIX/lib" && \
|
RUN cp -d glibc-build/out/lib/*.so "${PREFIX}/lib" && \
|
||||||
echo '/usr/lib' > "$PREFIX/etc/ld.so.conf" && \
|
echo '/usr/lib' > "${PREFIX}/etc/ld.so.conf" && \
|
||||||
ldconfig -r "$PREFIX"
|
ldconfig -r "${PREFIX}"
|
||||||
|
|
||||||
WORKDIR $PREFIX
|
WORKDIR $PREFIX
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user