Skip to content

Commit

Permalink
Fix for not working scripts/install-prod.sh
Browse files Browse the repository at this point in the history
For fresh applications, docker may exit with 129 code
instead of 0.
Issue found on: Docker version 17.03.2-ce, build f5ec1e2 (linux).

Related: docker/compose#3379
  • Loading branch information
aurelijusb committed Nov 12, 2018
1 parent db86c30 commit 3c50ab0
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion scripts/backend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,25 @@ fi
if [ "$ARGS" != "" ]; then
echo "Executing in PHP container: $ARGS"
docker exec -it php.symfony bash -c "$ARGS"

# Fix for known docker issue, when with "-it" parameter, command exits with status 129
EXIT_CODE=$?
if [ $EXIT_CODE -eq 129 ]; then
exit 0
else
exit $EXIT_CODE
fi
else
echo "Dependencies can be installed via: composer install"
echo "Many Symfony tools can be accessed via: bin/console"
echo 'Type "exit" to get out of terminal'
docker exec -it php.symfony bash
fi

# Fix for known docker issue, when with "-it" parameter, command exits with status 129
EXIT_CODE=$?
if [ $EXIT_CODE -eq 129 ]; then
exit 0
else
exit $EXIT_CODE
fi
fi

0 comments on commit 3c50ab0

Please sign in to comment.