Public Repository

Last pushed: a year ago
Short Description
A container that allows you to easily run local gcloud emulators (gcd, pubsub)
Full Description

FROM java:7-jre

RUN apt-get update
RUN apt-get install -y python

Install gcloud

ENV GCLOUD_OBJ=google-cloud-sdk-100.0.0-linux-x86_64.tar.gz
RUN wget https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/$GCLOUD_OBJ
RUN tar -xf $GCLOUD_OBJ -C /usr/local/
ENV PATH=/usr/local/google-cloud-sdk/bin:$PATH
RUN gcloud components install beta gcd-emulator pubsub-emulator

Create staging area

ADD ./ /mnt/data
WORKDIR /mnt/data
RUN mkdir gcd pubsub

ENV PORT=8080
ENV HOST=0.0.0.0

CMD echo "You should overwrite this command in your docker-compose.yml"

In your docker-compose, you can run a command like this for a pubsub emulator

/bin/bash -c 'gcloud config set project lolstats && gcloud beta emulators pubsub start --data-dir /mnt/data/pubsub --host-port 0.0.0.0:8080'

Docker Pull Command
Owner
vantagesports

Comments (0)