This repository holds a set of containerized Google Cloud Platform emulators used in development and testing purposes.
We currently provide the following emulators.
The Cloud Tasks emulator provides a way to work with the Cloud Tasks APIs locally.
See cloudtasks-emulator folder for additional details.
Or start the emulator with the following command:
cat <<EOT >> queue.yaml
queue:
- name: default
rate: 1/s
EOT
docker run \
--rm \
-p=9090:9090 \
--env="GCP_PROJECT=my-project" \
--volume="$PWD/queue.yaml:/configs/queue.yaml" \
spine3/cloudtasks-emulator
The Cloud Storage emulator provides a way to work with the Cloud Storage APIs locally.
See cloudstorage-emulator folder for additional details.
Or start the emulator with the following command:
docker run \
--rm \
-p=9199:9199 \
spine3/cloudstorage-emulator
The Datastore emulator image allows starting the emulator without the need of installing and configuring it locally.
See datastore-emulator folder for additional details.
Or start the emulator with the following command:
docker run \
--rm \
-p=8081:8081 \
--env "GCP_PROJECT=my-project" \
spine3/datastore-emulator
The Firebase emulator image allows reducing the hustle of setting up and configuring the emulator manually.
See firebase-emulator folder for additional details.
Or start the emulator with the following command:
docker run \
--rm \
-p=9000:9000 \
-p=8080:8080 \
-p=4000:4000 \
-p=9099:9099 \
-p=8085:8085 \
-p=5001:5001 \
-p=9199:9199 \
--env "GCP_PROJECT=my-project" \
--env "ENABLE_UI=true" \
spine3/firebase-emulator
By default, the container starts the whole Firebase emulators suite and the command above exposes their TCP ports.
You can find an example Docker Compose configuration
that one may use to start up the emulators altogether with just a single
docker-compose up
command.
Sometimes usage of the public Docker Hub images may be not a good idea due to the security restrictions or images pull performance/cost implications.
For such a use case we provide a reusable Cloud Build configurations that allows building and deploying the emulators to a private Google Container Registry images registry.
Look for a cloudbuild.yaml
file in the emulator folders, and a top-level one
to build them all together.