-
Notifications
You must be signed in to change notification settings - Fork 438
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
56326d4
commit d7f4dc8
Showing
5 changed files
with
25 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,20 @@ | ||
#!/bin/sh -eux | ||
|
||
docker pull -q gcr.io/google.com/cloudsdktool/cloud-sdk:384.0.1-emulators | ||
# default to "emulators", which is the latest available version | ||
EMULATOR_VERSION=emulators | ||
if [ "$#" -eq 2 ]; then | ||
# use the supplied emulator version (e.g. "384.0.1-emulators") | ||
EMULATOR_VERSION=$2 | ||
elif [ "$#" -ne 1 ]; then | ||
echo "usage: start-emulator.sh PRODUCT_GROUP [EMULATOR_VERSION]" | ||
exit 1; | ||
fi | ||
# Emulator version maybe different for individual products | ||
IMAGE="gcr.io/google.com/cloudsdktool/cloud-sdk:$EMULATOR_VERSION" | ||
docker pull -q $IMAGE | ||
CONTAINER=`docker run \ | ||
-d \ | ||
-p 8085:8085 \ | ||
gcr.io/google.com/cloudsdktool/cloud-sdk:384.0.1-emulators gcloud beta emulators $1 start --host-port=0.0.0.0:8085 --project=emulator-project` | ||
$IMAGE gcloud beta emulators $1 start --host-port=0.0.0.0:8085 --project=emulator-project` | ||
sleep 10 | ||
docker logs $CONTAINER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters