run_shell('ls -D -1 /etc/systemd/system/docker-container* | sed \'s/\/etc\/systemd\/system\///g\' | sed \'s/\.service//g\' | while read container; do service $container stop; done')
# Delete all running containers
run_shell("#{docker_command} rm -f $(#{docker_command} ps -a -q) || true")
run_shell('ls -D -1 /etc/systemd/system/docker-container* | sed \'s/\/etc\/systemd\/system\///g\' | sed \'s/\.service//g\' | while read container; do service $container stop; done')
# Stop all running containers
run_shell("#{docker_command} rm -f $(docker ps -a -q) || true")
# Make sure no other containers are running
run_shell("#{docker_command} ps | wc -l")do|r|
expect(r.stdout).tomatch(%r{^1$})
end
# Export new to a tar file
run_shell("#{docker_command} save alpine_from_commit > /root/rootfs.tar")