floci/floci-gcp

Sponsored OSS

By Floci

โ€ขUpdated about 5 hours ago

Light, fluffy, and always free - GCP Local Emulator

Image
Developer tools
0

10K+

floci/floci-gcp repository overview

โ floci-gcp

Light, fluffy, and always free โ€” GCP Local Emulator No account. No auth token. No feature gates. Just docker run.

Docker Pulls Image Size License: MIT

๐ŸŒ Websiteโ  ยท ๐Ÿ“– Docsโ  ยท ๐Ÿ™ GitHubโ 


โ What is floci-gcp?

floci-gcp is a free, open-source local emulator for Google Cloud Platform services, built for development, testing, and CI. Point your existing GCP SDK, gcloud CLI, Terraform, or test suite at http://localhost:4588 and keep your workflows intact โ€” no cloud account, no service account key, no paid feature gates.

All GCP services (gRPC and REST) share a single port (4588) via HTTP/2 ALPN negotiation, so there's no per-service daemon setup or port juggling.


โ Quick Start

โ Docker
docker run -d --name floci-gcp \
  -p 4588:4588 \
  floci/floci-gcp:latest
โ Docker Compose
services:
  floci-gcp:
    image: floci/floci-gcp:latest
    ports:
      - "4588:4588"
    volumes:
      - ./data:/app/data
    environment:
      FLOCI_GCP_HOSTNAME: floci-gcp
      FLOCI_GCP_BASE_URL: http://floci-gcp:4588
docker compose up -d
โ Point your SDK at the emulator
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 GOOGLE_CLOUD_PROJECT=floci-local

Credentials are not validated. Everything just works.


โ Supported Services

ServiceProtocolHighlights
Cloud StorageREST XML + REST JSONBuckets, objects, multipart upload, compose, ACLs, IAM, versioning, lifecycle, CORS, V4 signed URLs
Pub/SubgRPCTopics, subscriptions, publish, pull, streaming pull, push delivery, snapshots, seek
FirestoregRPCDocuments, collections, queries (all operators), transforms, COUNT, transactions, real-time listeners
DatastoreHTTP/protobufEntities, structured queries, GQL queries, aggregation (COUNT), transactions
Secret ManagergRPCSecrets, versioning, versions/latest alias, disable/enable/destroy, IAM bindings
IAMREST JSONService accounts, RSA-2048 key pairs, policy bindings, SignBlob (V4 signed URLs)
Managed KafkaREST JSONClusters, topics, consumer groups; Redpanda-backed or mock mode

โ Image Tags

ChannelTagUse case
Release, floatinglatestStable releases (recommended)
Release, pinnedx.y.zReproducible builds
Nightly, floatingnightlyTrack main branch
Nightly, datednightly-mmddyyyyPin to a specific nightly
# Recommended for most users
image: floci/floci-gcp:latest

# Pinned release
image: floci/floci-gcp:1.0.0

# Bleeding edge
image: floci/floci-gcp:nightly

โ Persistence Modes

Configure with FLOCI_GCP_STORAGE_MODE:

ModeBehaviorBest forDurability
memory(Default) Entirely in-RAM. Lost on restart.CI pipelines, speedโŒ None
persistentEvery write goes to disk synchronously.Durable local developmentโœ… Good
hybridIn-memory with async flush every 5 seconds.Balance of speed and safetyโœ… Good
walWrite-Ahead Log; every mutation persisted.Maximum durability๐Ÿ’Ž Highest

Mount a volume to /app/data (or set FLOCI_GCP_STORAGE_PERSISTENT_PATH) to retain data across container restarts.


โ Configuration

All settings use the FLOCI_GCP_ prefix.

VariableDefaultDescription
FLOCI_GCP_PORT4588Port for all services
FLOCI_GCP_DEFAULT_PROJECT_IDfloci-localDefault GCP project ID
FLOCI_GCP_BASE_URLhttp://localhost:4588Base URL returned in service responses
FLOCI_GCP_HOSTNAME(unset)Hostname for returned URLs (use in Docker Compose)
FLOCI_GCP_STORAGE_MODEmemorymemory ยท persistent ยท hybrid ยท wal
FLOCI_GCP_STORAGE_PERSISTENT_PATH./dataDirectory for persisted state
FLOCI_GCP_SERVICES_GCS_ENABLEDtrueEnable/disable Cloud Storage
FLOCI_GCP_SERVICES_PUBSUB_ENABLEDtrueEnable/disable Pub/Sub
FLOCI_GCP_SERVICES_FIRESTORE_ENABLEDtrueEnable/disable Firestore
FLOCI_GCP_SERVICES_DATASTORE_ENABLEDtrueEnable/disable Datastore
FLOCI_GCP_SERVICES_IAM_ENABLEDtrueEnable/disable IAM
FLOCI_GCP_SERVICES_SECRETMANAGER_ENABLEDtrueEnable/disable Secret Manager
FLOCI_GCP_SERVICES_KAFKA_ENABLEDtrueEnable/disable Managed Kafka
FLOCI_GCP_SERVICES_KAFKA_MOCKfalseKafka mock mode (no Docker; returns ACTIVE immediately)

โ Multi-container Docker Compose

When your application runs in another container, set FLOCI_GCP_HOSTNAME so URLs returned by the emulator resolve correctly between containers:

services:
  floci-gcp:
    image: floci/floci-gcp:latest
    ports:
      - "4588:4588"
    environment:
      FLOCI_GCP_HOSTNAME: floci-gcp
      FLOCI_GCP_BASE_URL: http://floci-gcp:4588

  my-app:
    image: my-app:latest
    environment:
      PUBSUB_EMULATOR_HOST: floci-gcp:4588
      FIRESTORE_EMULATOR_HOST: floci-gcp:4588
      STORAGE_EMULATOR_HOST: http://floci-gcp:4588
      SECRET_MANAGER_EMULATOR_HOST: floci-gcp:4588
    depends_on:
      - floci-gcp

โ Health Check

The emulator exposes a health endpoint at /_floci/health on port 4588, suitable for Docker HEALTHCHECK directives, Kubernetes probes, and Testcontainers wait strategies.

healthcheck:
  test: ["CMD", "curl", "-f", "http://localhost:4588/_floci/health"]
  interval: 10s
  timeout: 3s
  retries: 5

โ Multi-Project Isolation

floci-gcp uses the GCP project ID as a multi-tenancy boundary โ€” resources in project-a are invisible to project-b. The project ID is resolved from:

  1. The URL path segment projects/{project}/...
  2. The x-goog-request-params header
  3. FLOCI_GCP_DEFAULT_PROJECT_ID (default: floci-local)

โ Why floci-gcp?

GCP's official emulators are fragmented โ€” each service ships its own binary, runs on a different port, and requires separate setup. floci-gcp unifies them.

Capabilityfloci-gcpGCP official emulators
Single port for all servicesโœ…โŒ
gRPC + REST on the same portโœ…โŒ
No GCP account requiredโœ…โœ…
Pub/Subโœ…โœ…
Firestoreโœ…โœ…
Datastoreโœ…โœ…
Cloud Storage (GCS)โœ…โš ๏ธ Limited
Secret Managerโœ…โŒ
IAMโœ…โŒ
Managed Kafkaโœ…โŒ
Native binaryโœ…โŒ

โ License

Released under the MIT Licenseโ . Use it however you want.

Tag summary

Content type

Image

Digest

sha256:2ecfa088cโ€ฆ

Size

179.6 MB

Last updated

about 5 hours ago

docker pull floci/floci-gcp:nightly-07222026-compat

This week's pulls

Pulls:

3,602

Last week