Sign inSign up

niallmccullagh/docker-google-cloud-emulators

By niallmccullagh

Updated over 9 years ago

A docker container that contains the pubsub emulator and the datastore emulators.

Image
1

10K+

niallmccullagh/docker-google-cloud-emulators repository overview

Google Cloud Emulators

Docker Automated build

A docker container that runs the pubsub emulator and the datastore emulator.

Pub / Sub

Running
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"
Running with the compose

Using the compose file in the repository the pubsub emulator can be started by running

docker-compose up pubsub
Configured local environment

The local environment must be updated to point to the emulator

export PUBSUB_EMULATOR_HOST=localhost:8590
Persistent Data

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

Datastore

Running
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"
Running with compose

Using the compose file in the repository the datastore emulator can be started by running

docker-compose up datastore
Configured local environment

The local environment must be updated to point to the emulator

export DATASTORE_EMULATOR_HOST=localhost:8432
export DATASTORE_PROJECT_ID=emulator

Persistent Data

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

Tag summary

Content type

Image

Digest

Size

286.2 MB

Last updated

over 9 years ago

docker pull niallmccullagh/docker-google-cloud-emulators