Fix Dockerfile to check return values. (#389)

This commit is contained in:
OttoHollmann 2021-03-23 00:34:40 +01:00 committed by GitHub
parent 29c0481cb2
commit 8eb2bd9ee1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,10 +24,10 @@ RUN ln -s -f /usr/bin/clang /usr/bin/cc && \
RUN if [ "$(uname -m)" == "x86_64" ]; \ RUN if [ "$(uname -m)" == "x86_64" ]; \
then export RUSTFLAGS='-Ctarget-cpu=haswell'; \ then export RUSTFLAGS='-Ctarget-cpu=haswell'; \
fi; \ fi && \
if [ "$(uname -m)" == "aarch64" ]; \ if [ "$(uname -m)" == "aarch64" ]; \
then export RUSTFLAGS=''; \ then export RUSTFLAGS=''; \
fi; \ fi && \
if [ "${SCCACHE_REDIS}" != "" ]; \ if [ "${SCCACHE_REDIS}" != "" ]; \
then \ then \
export CC="/usr/bin/sccache /usr/bin/clang" && \ export CC="/usr/bin/sccache /usr/bin/clang" && \
@ -35,7 +35,7 @@ RUN if [ "$(uname -m)" == "x86_64" ]; \
sccache --start-server; \ sccache --start-server; \
else \ else \
export CC="/usr/bin/clang"; \ export CC="/usr/bin/clang"; \
fi; \ fi && \
export RUSTC_BOOTSTRAP=1 && \ export RUSTC_BOOTSTRAP=1 && \
echo $RUSTC_BOOTSTRAP && \ echo $RUSTC_BOOTSTRAP && \
echo $RUSTC_WRAPPER && \ echo $RUSTC_WRAPPER && \
@ -43,10 +43,10 @@ RUN if [ "$(uname -m)" == "x86_64" ]; \
echo $CC && \ echo $CC && \
cargo build \ cargo build \
--features=simd_support,libsqlite3-sys/bundled \ --features=simd_support,libsqlite3-sys/bundled \
--release; \ --release && \
if [ "${SCCACHE_REDIS}" != "" ]; \ if [ "${SCCACHE_REDIS}" != "" ]; \
then sccache -s; \ then sccache -s; \
fi; \ fi && \
ls -al /usr/src/kanidm/target/release/ ls -al /usr/src/kanidm/target/release/