Skip to content

Commit

Permalink
Switch order of checks
Browse files Browse the repository at this point in the history
  • Loading branch information
epapbak committed Aug 9, 2024
1 parent 6637fd9 commit 6f4c487
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions run_in_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@ command_exists() {
command -v "$1" &> /dev/null
}

# Check if Podman is installed
if command_exists podman; then
CONTAINER_TOOL="podman"
COMPOSER="podman-compose"

# Check if Docker is installed
elif command_exists docker; then
if command_exists docker; then
CONTAINER_TOOL="docker"
COMPOSER="docker compose"
# Check if Podman is installed
elif command_exists podman; then
CONTAINER_TOOL="podman"
COMPOSER="podman-compose"
else
echo "Neither Docker nor Podman is installed on this system."
echo "Neither Docker nor Podman are installed on this system."
exit 1
fi

Expand Down Expand Up @@ -165,6 +166,7 @@ POSTGRES_DB_NAME="$db_name" "$COMPOSER" $(with_profile "$1") $(with_no_mock "$3"
# Step 5: Find the container ID of the insights-behavioral-spec container
cid=$("$CONTAINER_TOOL" ps | grep 'insights-behavioral-spec:latest' | cut -d ' ' -f 1)

exit 0
# shellcheck disable=SC2016
REMOTE_PATH_FOR_SERVICE="$cid:$("$CONTAINER_TOOL" exec "$cid" bash -c 'echo "$HOME"')"

Expand Down

0 comments on commit 6f4c487

Please sign in to comment.