Light, fluffy, and always free - GCP Local Emulator
50K+
Any Cloud. Locally.
Light, fluffy, and always free: the GCP local emulator
A free, open-source local GCP emulator for development, testing, and CI. No account. No auth token. No feature gates.
Google ships a separate emulator per service, each its own process on its own port. floci-gcp replaces all of them with one binary on a single port, reusing the *_EMULATOR_HOST variables the GCP SDKs already honor.
| Emulator | Cloud | Port |
|---|---|---|
| floci | AWS | 4566 |
| floci-az | Azure | 4577 |
| floci-gcp | GCP | 4588 |
| floci-oci | OCI | 4599 |
# docker-compose.yml
services:
floci-gcp:
image: floci/floci-gcp:latest
ports:
- "4588:4588"
volumes:
- ./data:/app/data
- /var/run/docker.sock:/var/run/docker.sock # Cloud Run, Cloud SQL, Kafka, GKE
environment:
FLOCI_GCP_HOSTNAME: floci-gcp
FLOCI_GCP_BASE_URL: http://floci-gcp:4588
FLOCI_GCP_STORAGE_MODE: hybrid
docker compose up -d
export PUBSUB_EMULATOR_HOST=localhost:4588
export FIRESTORE_EMULATOR_HOST=localhost:4588
export DATASTORE_EMULATOR_HOST=localhost:4588
export STORAGE_EMULATOR_HOST=http://localhost:4588
export SECRET_MANAGER_EMULATOR_HOST=localhost:4588
export FIREBASE_AUTH_EMULATOR_HOST=localhost:4588
export GOOGLE_CLOUD_PROJECT=floci-local
Credentials are not cryptographically validated. The exception is a Floci-issued downscoped token, whose GCS requests are evaluated against its Credential Access Boundary.
| Capability | floci-gcp | GCP official emulators |
|---|---|---|
| Single port for all services | Yes | No |
| gRPC and REST on the same port | Yes | No |
| Pub/Sub, Firestore, Datastore | Yes | Yes |
| Cloud Storage | Yes | Limited |
| Secret Manager, KMS, IAM, Logging | Yes | No |
| Cloud Run, Cloud Functions, GKE | Yes | No |
| Cloud SQL, Cloud Tasks, Cloud Scheduler | Yes | No |
| Managed Kafka, Eventarc, BigQuery | Yes | No |
| Native binary | Yes | No |
All services share port 4588 via HTTP/2 ALPN negotiation.
| Category | Services |
|---|---|
| Storage and documents | Cloud Storage (GCS), Firestore, Datastore |
| Messaging and events | Pub/Sub, Managed Kafka, Eventarc |
| Security and identity | Secret Manager, Cloud KMS, IAM, IAM Service Account Credentials, Firebase Auth (Identity Platform) |
| Containers and serverless | GKE, Cloud Run, Cloud Functions |
| Task scheduling | Cloud Tasks, Cloud Scheduler |
| Databases | Cloud SQL for PostgreSQL |
| Analytics | BigQuery (Phase 1) |
| Observability | Cloud Logging, Cloud Monitoring |
| API management | Service Usage, Cloud Resource Manager |
floci-gcp speaks the real wire protocols: protobuf over gRPC for Pub/Sub, Firestore, Secret Manager, and Cloud Storage v2; binary HTTP/protobuf for Datastore; REST XML and JSON for Cloud Storage; REST JSON for management APIs.
Real Docker where fidelity matters. Each is gated by a *_MOCK flag to run metadata-only without Docker.
| Service | Default image | Mock flag |
|---|---|---|
| Managed Kafka | redpandadata/redpanda:latest | FLOCI_GCP_SERVICES_KAFKA_MOCK |
| Cloud SQL for PostgreSQL | postgres:15.18-alpine (15 to 18) | FLOCI_GCP_SERVICES_CLOUDSQL_MOCK |
| Cloud Run | User-specified image | FLOCI_GCP_SERVICES_CLOUDRUN_MOCK |
| GKE | rancher/k3s:latest | FLOCI_GCP_SERVICES_GKE_MOCK |
| gcloud emulator | floci-gcp |
|---|---|
PUBSUB_EMULATOR_HOST=localhost:8085 | localhost:4588 |
FIRESTORE_EMULATOR_HOST=localhost:8080 | localhost:4588 |
DATASTORE_EMULATOR_HOST=localhost:8081 | localhost:4588 |
FIREBASE_AUTH_EMULATOR_HOST=localhost:9099 | localhost:4588 |
| (no official emulator) | STORAGE_EMULATOR_HOST=http://localhost:4588 |
| (no official emulator) | SECRET_MANAGER_EMULATOR_HOST=localhost:4588 |
The SDKs skip credential checks automatically when these are set, so no code changes are needed.
| Variable | Default | Description |
|---|---|---|
FLOCI_GCP_PORT | 4588 | Port for all services, gRPC and REST |
FLOCI_GCP_DEFAULT_PROJECT_ID | floci-local | Default project ID |
FLOCI_GCP_BASE_URL | http://localhost:4588 | Base URL returned in responses |
FLOCI_GCP_HOSTNAME | (unset) | Hostname in returned URLs (Docker Compose) |
FLOCI_GCP_STORAGE_MODE | memory | memory, persistent, hybrid, or wal |
FLOCI_GCP_STORAGE_PERSISTENT_PATH | ./data | Directory for persisted state |
FLOCI_GCP_SERVICES_DOCKER_NETWORK | (unset) | Network that spawned sidecars join |
Full reference: floci.io/floci-gcp/configuration
Multi-project isolation: the project ID is the tenancy boundary, resolved from the projects/{project}/... path, then the x-goog-request-params header, then FLOCI_GCP_DEFAULT_PROJECT_ID.
Test harness endpoints: GET /health, GET /_floci-gcp/info, and POST /_floci-gcp/state/reset to wipe state between tests without a restart.
Validated across the Java, Node.js, Python, and Go GCP SDKs, the gcloud CLI, and both Terraform and OpenTofu with the Google provider. See compatibility-tests.
| Channel | Tag |
|---|---|
| Release, floating | latest |
| Release, pinned | x.y.z |
| Nightly | nightly, nightly-mmddyyyy |
Stable releases ship on the 1st and 3rd Tuesday of each month. nightly tracks main.
MIT. Use it however you want.
Content type
Image
Digest
sha256:ea29a53b3…
Size
53.4 MB
Last updated
6 days ago
docker pull floci/floci-gcpPulls:
8,461
Last week