Skip to content

Commit

Permalink
Fix Docker usage (#754)
Browse files Browse the repository at this point in the history
  • Loading branch information
santib authored Jun 12, 2024
1 parent 8473b5d commit 5e0cfa5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@
end

def running_with_docker?
ENV['DOCKER_ENABLED'] == 'true' && docker_compose_installed?
ENV['DOCKER_ENABLED'] == 'true' && docker_compose_installed? && docker_running?
end

def docker_compose_installed?
system('which docker-compose > /dev/null 2>&1')
end

def docker_running?
system('docker ps > /dev/null 2>&1')
end

0 comments on commit 5e0cfa5

Please sign in to comment.