vovimayhem / docker-google-pubsub-emulator

Google PubSub Emulator Docker Image

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Google Cloud PubSub Emulator for Docker

Docker Pulls Docker Build Status Docker Automated Build

This is the Docker image for the Google Cloud PubSub Emulator

Basic Usage

This command will download the image if it isn't present, and start the emulator, making it available at localhost:8085:

docker run -p 8085:8085 vovimayhem/google-pubsub-emulator

Advanced Usage

Data volume

This image accepts mounting a volume for the emulator to store data. Inside the pubsub, the emulator expects the data to be available at /data:

docker run -p 8085:8085 -v /tmp/data:/data vovimayhem/google-pubsub-emulator

Docker Compose

You can also use it on your docker-compose.yml file. Notice the env variable PUBSUB_EMULATOR_HOST on the app service to configure the client so it points to the emulator:

version: "2.4"

volumes:
  pubsub_data:

services:
  pubsub:
    image: vovimayhem/google-pubsub-emulator:latest
    ports:
    - ${PUBSUB_PORT:-8085}:8085
    volumes:
    - pubsub_data:/data
  app:
    # Some lines ommitted
    environment:
      PUBSUB_EMULATOR_HOST: pubsub:8085

About

Google PubSub Emulator Docker Image

License:MIT License


Languages

Language:Dockerfile 58.7%Language:Shell 41.3%