Google Cloud Firestore Emulator
1M+
A Google Cloud Firestore Emulator container image. The image creates a local, standalone Firestore emulator for testing Firestore-backed apps.
To run the emulator in a standalone Docker container:
docker run \
--name firestore-emulator \
--env "FIRESTORE_PROJECT_ID=dummy-project-id" \
--env "PORT=8080" \
--publish 8080:8080 \
mtlynch/firestore-emulator-docker
To run the emulator in a docker-compose configuration with your app, use the following example configuration for reference.
version: "3.2"
services:
firestore_emulator:
image: mtlynch/firestore-emulator
environment:
- FIRESTORE_PROJECT_ID=dummy-project-id
- PORT=8200
ports:
- 8200:8200
app:
image: your-app-image
environment:
- FIRESTORE_EMULATOR_HOST=firestore_emulator:8200
- FIRESTORE_PROJECT_ID=dummy-project-id
depends_on:
- firestore_emulator
FIRESTORE_PROJECT_ID: This is the Google Cloud Project ID that the emulator uses.
dummy-firestore-idPORT: The port on which the firestore emulator listens for HTTP requests.
8080If you're using a standard Firestore client library and set the environment variable FIRESTORE_EMULATOR_HOST, then your app will connect to the emulator instead of the production Firestore URL. The variable specifies a host:port pair where the emulator is listening, for example firestore_emulator:8080.
Your app must also set the FIRESTORE_PROJECT_ID or explicitly set a Firestore project ID to match the FIRESTORE_PROJECT_ID you set in the emulator. The image's default project ID is dummy-firestore-id.
Content type
Image
Digest
Size
426.2 MB
Last updated
over 4 years ago
docker pull mtlynch/firestore-emulator