
Temporal是一个基于"Workflow as Code (TM)"理念的分布式工作流编排平台,旨在帮助开发者构建和运行弹性应用。本Docker镜像封装了Temporal服务端组件,提供开箱即用的工作流引擎环境,支持工作流定义、执行、监控和管理全生命周期,使开发者能够专注于业务逻辑而非基础设施复杂性。
4.1.1 开发环境启动(默认配置)
bashdocker run -d \ --name temporal \ -p 7233:7233 \ # Frontend服务端口(客户端连接) -p 8088:8088 \ # Web管理界面端口 temporalio/server:latest
说明:默认使用SQLite作为嵌入式数据库(仅开发环境),启动Frontend/History/Matching/Worker服务组件,Web界面访问地址:http://localhost:8088
4.1.2 生产环境基础配置(外部PostgreSQL)
bashdocker run -d \ --name temporal \ -p 7233:7233 \ -p 8088:8088 \ -e DB=postgresql \ -e DB_PORT=5432 \ -e DB_HOST=postgres-host \ -e DB_USER=postgres-user \ -e DB_PASSWORD=postgres-password \ -e DB_NAME=temporal \ -e SERVICES=frontend,history,matching \ # 生产环境通常拆分Worker服务 temporalio/server:latest
yamlversion: '3.8' services: postgres: image: postgres:14-alpine environment: POSTGRES_USER: temporal POSTGRES_PASSWORD: temporal POSTGRES_DB: temporal volumes: - postgres-data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U temporal"] interval: 5s timeout: 5s retries: 5 temporal: image: temporalio/server:latest depends_on: postgres: condition: service_healthy environment: SERVICES: frontend,history,matching # 核心服务组件 DB: postgresql DB_HOST: postgres DB_PORT: 5432 DB_USER: temporal DB_PASSWORD: temporal DB_NAME: temporal PORT: 7233 # Frontend服务端口 WEB_PORT: 8088 # Web管理界面端口 LOG_LEVEL: info # 日志级别:debug/info/warn/error ports: - "7233:7233" - "8088:8088" volumes: - temporal-data:/etc/temporal/config temporal-admin-tools: image: temporalio/admin-tools:latest depends_on: - temporal environment: TEMPORAL_CLI_ADDRESS: temporal:7233 command: tail -f /dev/null # 保持容器运行,用于执行tctl命令 volumes: postgres-data: temporal-data:
启动命令:
bashdocker-compose up -d
4.3.1 核心环境变量配置
| 环境变量名 | 描述 | 默认值 | 示例值 |
|---|---|---|---|
SERVICES | 启动的Temporal服务组件 | frontend,history,matching,worker | frontend,history,matching |
DB | 数据库类型 | sqlite | postgresql |
DB_HOST | 数据库主机地址 | localhost | postgres |
DB_PORT | 数据库端口 | 5432(PostgreSQL)/3306(MySQL) | 5432 |
DB_USER | 数据库用户名 | temporal | temporal-prod |
DB_PASSWORD | 数据库密码 | temporal | SecurePass123! |
DB_NAME | 数据库名称 | temporal | temporal_production |
PORT | Frontend服务端口(客户端连接) | 7233 | 7233 |
WEB_PORT | Web管理界面端口 | 8088 | 8080 |
LOG_LEVEL | 日志级别 | info | debug |
DYNAMIC_CONFIG_FILE | 动态配置文件路径(高级配置) | /etc/temporal/config/dynamicconfig/development.yaml | /etc/temporal/dynamic.yaml |
1.22.0)而非latest,避免自动升级导致兼容性问题TLS_CERT/TLS_KEY环境变量),并限制数据库访问权限您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
docker search 限制
站内搜不到镜像
离线 save/load
插件要用 plugin install
WSL 拉取慢
安全与 digest
新手拉取配置
镜像合规机制
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
域名连通性排查
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务