Skip to content

Commit

Permalink
make run.sh Linux compatible
Browse files Browse the repository at this point in the history
`docker-machine` is not relevant for Linux distros so it doesn't exists in Ubuntu for example. Consequently the script hangs in infinite loop because `nc` command is invalid with an empty `DOCKER_IP�`.
  • Loading branch information
destan committed Apr 22, 2016
1 parent 7c44274 commit cc70d96
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ mvn clean install
# Export the active docker machine IP
export DOCKER_IP=$(docker-machine ip $(docker-machine active))

# docker-machine doesn't exist in Linux, assign default ip if it's not set
DOCKER_IP=${DOCKER_IP:-0.0.0.0}

# Remove existing containers
docker-compose stop
docker-compose rm -f
Expand Down Expand Up @@ -38,4 +41,4 @@ done
docker-compose up -d

# Attach to the log output of the cluster
docker-compose logs
docker-compose logs

0 comments on commit cc70d96

Please sign in to comment.