use bash AND (&&) instead of command-separator (;) on docker images
Otherwise, image build phases yield images even though there may be
erros in the build process.
For example, the following image is built however there is a command
that fails (false command)
echo -e 'FROM ubuntu:bionic\nRUN false; true' | docker build -
Sending build context to Docker daemon 2.048kB
Step 1/2 : FROM ubuntu:bionic
---> 56def654ec22
Step 2/2 : RUN false; true
---> Running in 85759437ee6b
Removing intermediate container 85759437ee6b
---> 44ee5447fd5d
Successfully built 44ee5447fd5d
versus this image that fails (correctly) due to errors
echo -e 'FROM ubuntu:bionic\nRUN false && true' | docker build -
Sending build context to Docker daemon 2.048kB
Step 1/2 : FROM ubuntu:bionic
---> 56def654ec22
Step 2/2 : RUN false && true
---> Running in f4b9ac94bf12
The command '/bin/sh -c false && true' returned a non-zero code: 1
Signed-off-by: Leonardo Sandoval <leonardo.sandoval@linaro.org>
Change-Id: Iea48194869c884fc6d3d6c64a1fd6ea7be41ec84
4 files changed