A docker container that runs the pubsub emulator and the datastore emulator.
docker run -t -p 8538:8538 niallmccullagh/docker-google-cloud-emulators /bin/bash -c "gcloud config set project emulator && gcloud beta emulators pubsub start --data-dir /mnt/data/pubsub --host-port 0.0.0.0:8538"
Using the compose file in the repository the pubsub emulator can be started by running
docker-compose up pubsub
The local environment must be updated to point to the emulator
export PUBSUB_EMULATOR_HOST=localhost:8590
To persist data outside of the container mount a volume from the host to /mnt/data/pubsub
For an example see the persistent-pubsub
service in the docker-compose file
docker run -t -p 8538:8538 niallmccullagh/docker-google-cloud-emulators /bin/bash -c "gcloud config set project emulator && gcloud beta emulators datastore start --data-dir /mnt/data/gcd --host-port 0.0.0.0:8538"
Using the compose file in the repository the datastore emulator can be started by running
docker-compose up datastore
The local environment must be updated to point to the emulator
export DATASTORE_EMULATOR_HOST=localhost:8432
export DATASTORE_PROJECT_ID=emulator
To persist data outside of the container mount a volume from the host to /mnt/data/gcd
For an example see the persistent-datastore
service in the docker-compose file