Move cleaning up logic to clean_up(), so it runs as part of the clean_up_trap if any command in the previous code fails.
For example, if the first docker container started properly, but the second docker container failed to start: without this patch, it would just stop the script without running the clean up code.