diff --git a/README.md b/README.md index 91d04b2..d5e0678 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,6 @@ Just follow these steps: * Go into your project's directory * Create a .cqfdrc file * Put a Dockerfile and save it as .cqfd/docker/Dockerfile -* Run ``cqfd --init`` Examples are available in the samples/ directory. diff --git a/cqfd b/cqfd index 52c5ed2..4dd9977 100755 --- a/cqfd +++ b/cqfd @@ -187,9 +187,8 @@ docker_build() { # arg$1: the command string to execute as $cqfd_user # docker_run() { - if ! docker image inspect $docker_img_name &> /dev/null; then - die "The docker image doesn't exist, launch 'cqfd --init' to create it" + docker_build fi local interactive_options diff --git a/tests/05-cqfd_run b/tests/05-cqfd_run index 3a35750..dddb526 100755 --- a/tests/05-cqfd_run +++ b/tests/05-cqfd_run @@ -42,8 +42,11 @@ done ################################################################################ jtest_prepare "Modifying the Dockerfile should require running 'cqfd --init' again" dockerfile=.cqfd/docker/Dockerfile +prev_img_count=$(docker images | grep cqfd_test | wc -l) echo "RUN echo $RANDOM" >> $dockerfile -if $TDIR/.cqfd/cqfd; then +$cqfd +new_img_count=$(docker images | grep cqfd_test | wc -l) +if [ "$prev_img_count" -eq "$new_img_count" ]; then jtest_result fail else jtest_result pass