evolutecx/firebase-emulatorA dockerized firebase emulator setup, that actually exports existing data when the container shuts down and re-imports data when the container starts up again *
We created this image because [***] failed to export and restore emulator state and they didnt publish a configurable Dockerfile
* In order to make this export/import work, a volume is needed - see below "Persisting data"
FB_PROJECT_ID in the docker-compose.yml-Filedocker-compose up in that directory to spin up the emulators (this has a volume definition for exporting and importing data - see "Persisting Data" to understand what this means 😉)you can use ordinary docker-commands like so:
(Important: You need to specify your Firebase Project ID with the environment variable FB_PROJECT_ID)
shdocker run -d \ --name firebase-emulator \ -e FB_PROJECT_ID=[your_project_id] \ evolutecx/firebase-emulator:latest
From beginning of version 0.0.3 the pre-built images support linux/amd64, linux/arm64, linux/ppc64le and linux/s390x out of the box. By the time of this release this was all the architectures we could build for based on the latest node-18-alpine image.
Versions up to 0.0.2 only support linux/amd64 (which results in poor performance when running on apple silicon chips) - the change from version 0.0.2 to 0.0.3 is actually only the multi-architecture build, nothing else, so upgrading to 0.0.3 should be safe.
The right architecture will be used during container creation.
If you need more architectures to be suppported let us know on our github.
You can also build your own Image for more architectures
The emulators will be available under these addresses:
By default the emulator exposes these ports:
To change the ports on your host, just specify them in your docker- or docker-compose-command like so:
shdocker run -d \ --name firebase-emulator \ -p ***:8080 \ -p ***:4000 \ -p ***:9099 \ -p ***:5001 \ -p ***:9000 \ -p ***:9199 \ -e FB_PROJECT_ID=[your_project_id] \ evolutecx/firebase-emulator:latest
or with docker-compose
yamlservices: firebase-emulator: image: evolutecx/firebase-emulator:latest ports: - ***:8080 #Firestore - ***:4000 #Emulator UI - ***:9099 #Firebase Auth - ***:9199 #Firebase Cloud Storage - ***:9000 #Firebase Realtime database environment: - FB_PROJECT_ID=[YOUR_PROJECT_ID]
In this example we map port *** on the host to port 8080 on the container (and also for all the other ports)
The container is configured in a way that it exports all data to /firebase/data/export on shutdown and re-imports it from there during startup.
In order to persist data between runs, a volume is needed.
IMPORTANT: The volume should mount to /firebase/data in the container, do NOT explicitly mount to /firebase/data/export, as the emulator will error with Export failed: dest already exists
Define a named volume that points to the /firebase/data-folder in the container.
shdocker run -d \ --name firebase-emulator \ -v ./firebase_data:/firebase/data \ -e FB_PROJECT_ID=[your_project_id] \ evolutecx/firebase-emulator:latest
Make sure you define a volume-section for your service in your docker-compose file, like so:
yamlservices: firebase-emulator: container_name: firebase-emulator image: evolutecx/firebase-emulator:latest restart: always ports: - 4000:4000 #Emulator UI - 9099:9099 #Firebase Auth - 8080:8080 #Firestore - 9199:9199 #Firebase Cloud Storage - 9000:9000 #Firebase Realtime database environment: - FB_PROJECT_ID=[YOUR_PROJECT_ID] volumes: - ./firebase-data:/firebase/data:rw # <- this stores data on shutdown to ./firebase-data/data/export on your host
From beginning of version 0.0.3 the pre-built images support linux/amd64, linux/arm64, linux/ppc64le and linux/s390x out of the box. By the time of this release this was all the architectures we could build for based on the latest node-18-alpine image.
You can try building a new version of the image and pushing it to dockerhub yourself:
docker buildx build --platform linux/amd64,linux/arm64,[other_architectures_you_want_to_support] -t [username]/[image]:[version] .
More information here: [***]
Feel free to fork the repo and create Merge requests to our repo. Otherwise feel free to create an issue and we will have a look.
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
在 Linux 系统配置镜像服务
在 Docker Desktop 配置镜像
Docker Compose 项目配置
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
MacOS OrbStack 容器配置
在宝塔面板一键配置镜像
Synology 群晖 NAS 配置
飞牛 fnOS 系统配置镜像
极空间 NAS 系统配置服务
爱快 iKuai 路由系统配置
绿联 NAS 系统配置镜像
QNAP 威联通 NAS 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
无需登录使用专属域名
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
免费版仅支持 Docker Hub 访问,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。
专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等;免费版仅支持 docker.io。
当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。
通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。
先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。
使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。
来自真实用户的反馈,见证轩辕镜像的优质服务