firebase deployment environment packaging, running as a secure sandbox environment.
538
Integrated Firebase development environment Docker image, solving issues like slow network access and complex configuration.
# Pull the image
docker pull jackchen86/firebase-dev-cn:latest
# Persist login state
docker volume create firebase-config
# Quick start development environment
docker run -it --rm \
-p 5000:5000 \
-p 5001:5001 \
-p 8080:8080 \
-p 4000:4000 \
-p 9005:9005 \
-v $(pwd):/workspace \
-v firebase-config:/home/firebase/.config \
jackchen86/firebase-dev-cn:latest
Persist Login State docker volume create firebase-config
version: '3.8'
services:
firebase-dev:
image: jackchen86/firebase-dev-cn:latest
ports:
- "5000:5000" # Firebase Hosting
- "5001:5001" # Firebase Functions
- "8080:8080" # Firestore Emulator
- "8085:8085" # Auth Emulator
- "9000:9000" # Database Emulator
- "9005:9005" # Firebase Login Verification Callback Port
- "9099:9099" # Storage Emulator
- "4000:4000" # Emulator UI
- "5173:5173" # Vite Development Server
volumes:
- .:/workspace
environment:
- NODE_ENV=development
tty: true
stdin_open: true
volumes:
firebase-config:
external: true
# Persist login state
docker volume create firebase-config
# If you need to use proxy
docker run -it --rm \
-e http_proxy=http://proxy.company.com:8080 \
-e https_proxy=http://proxy.company.com:8080 \
-p 5000:5000 \
-p 5001:5001 \
-p 8080:8080 \
-p 4000:4000 \
-p 9005:9005 \
-v $(pwd):/workspace \
-v firebase-config:/home/firebase/.config \
jackchen86/firebase-dev-cn:latest
| Port | Service | Description |
|---|---|---|
| 5000 | Firebase Hosting | Static website hosting |
| 5001 | Firebase Functions | Cloud functions |
| 8080 | Firestore Emulator | NoSQL database |
| 8085 | Auth Emulator | User authentication |
| 9000 | Database Emulator | Realtime database |
| 9005 | Firebase Login Verification Callback Port | Login verification |
| 9099 | Storage Emulator | File storage |
| 4000 | Emulator UI | Unified management interface |
| 5173-5180 | Development Server | Vite/Webpack etc. |
# Execute after entering container
firebase login
firebase init
# Start Hosting
firebase serve --only hosting
# Start all emulators
firebase emulators:start
# Build project
npm run build
# Deploy to Firebase
firebase deploy
A: Recommend using WSL2 or Docker Desktop, mount paths using Linux format.
A: Mount Firebase configuration directory:
docker volume create firebase-config
... -v firebase-config:/home/firebase/.config jackchen86/firebase-dev-cn:latest
A: Execute after entering container:
npm config set registry https://your-registry.com/
A: Modify port mapping:
-p 15000:5000 # Map local port 15000 to container port 5000
| Operation | Native Environment | This Image | Improvement |
|---|---|---|---|
| npm install | 5-10 minutes | 1-2 minutes | 5x+ |
| Firebase CLI Installation | 2-5 minutes | Ready to use | Infinite |
| Emulator Startup | 30-60 seconds | 10-15 seconds | 3x+ |
| Project Initialization | Complex configuration | One-click start | 10x+ |
🔥 Make Firebase development easier, make developers more efficient!
If this image helps you, please give a ⭐Star for support!
集成Firebase开发环境Docker镜像,解决网络访问慢、配置复杂等问题。
# 拉取镜像
docker pull jackchen86/firebase-dev-cn:latest
# 持久化登入状态
docker volume create firebase-config
# 快速启动开发环境
docker run -it --rm \
-p 5000:5000 \
-p 5001:5001 \
-p 8080:8080 \
-p 4000:4000 \
-p 9005:9005 \
-v $(pwd):/workspace \
-v firebase-config:/home/firebase/.config \
jackchen86/firebase-dev-cn:latest
持久化登入状态 docker volume create firebase-config
version: '3.8'
services:
firebase-dev:
image: jackchen86/firebase-dev-cn:latest
ports:
- "5000:5000" # Firebase Hosting
- "5001:5001" # Firebase Functions
- "8080:8080" # Firestore模拟器
- "8085:8085" # Auth模拟器
- "9000:9000" # Database模拟器
- "9005:9005" # Firebase 登入验证回调端口
- "9099:9099" # Storage模拟器
- "4000:4000" # 模拟器UI
- "5173:5173" # Vite开发服务器
volumes:
- .:/workspace
environment:
- NODE_ENV=development
tty: true
stdin_open: true
volumes:
firebase-config:
external: true
# 持久化登入状态
docker volume create firebase-config
# 如果需要使用代理
docker run -it --rm \
-e http_proxy=http://proxy.company.com:8080 \
-e https_proxy=http://proxy.company.com:8080 \
-p 5000:5000 \
-p 5001:5001 \
-p 8080:8080 \
-p 4000:4000 \
-p 9005:9005 \
-v $(pwd):/workspace \
-v firebase-config:/home/firebase/.config \
jackchen86/firebase-dev-cn:latest
| 端口 | 服务 | 说明 |
|---|---|---|
| 5000 | Firebase Hosting | 静态网站托管 |
| 5001 | Firebase Functions | 云函数 |
| 8080 | Firestore模拟器 | NoSQL数据库 |
| 8085 | Auth模拟器 | 用户认证 |
| 9000 | Database模拟器 | 实时数据库 |
| 9005 | Firebase 登入验证回调端口 | 登入验证 |
| 9099 | Storage模拟器 | 文件存储 |
| 4000 | 模拟器UI | 统一管理界面 |
| 5173-5180 | 开发服务器 | Vite/Webpack等 |
# 进入容器后执行
firebase login
firebase init
# 启动Hosting
firebase serve --only hosting
# 启动所有模拟器
firebase emulators:start
# 构建项目
npm run build
# 部署到Firebase
firebase deploy
A: 推荐使用WSL2或Docker Desktop,挂载路径使用Linux格式。
A: 挂载Firebase配置目录:
docker volume create firebase-config
... -v firebase-config:/home/firebase/.config jackchen86/firebase-dev-cn:latest
A: 进入容器后执行:
npm config set registry https://your-registry.com/
A: 修改端口映射:
-p 15000:5000 # 将本地15000端口映射到容器5000端口
| 操作 | 原生环境 | 本镜像 | 提升 |
|---|---|---|---|
| npm install | 5-10分钟 | 1-2分钟 | 5倍+ |
| Firebase CLI安装 | 2-5分钟 | 即开即用 | 无限 |
| 模拟器启动 | 30-60秒 | 10-15秒 | 3倍+ |
| 项目初始化 | 复杂配置 | 一键启动 | 10倍+ |
🔥 让Firebase开发更简单,让开发者更高效!
如果这个镜像对您有帮助,请给个⭐Star支持一下!
Content type
Image
Digest
sha256:607e1881f…
Size
602.8 MB
Last updated
over 1 year ago
docker pull jackchen86/firebase-dev-cn