使用 Docker 部署 Seata Server
注意事项
- 避免直接拉取latest版本镜像,latest版本并不一定是稳定版本,为避免不必要的问题,请到docker镜像仓库确定要拉取的镜像版本。
快速开始
启动seata-server实例
$ docker run --name seata-server -p 8091:8091 seataio/seata-server:1.4.2
指定seata-server IP和端口 启动
$ docker run --name seata-server \
-p 8091:8091 \
-e SEATA_IP=192.168.1.1 \
-e SEATA_PORT=8091 \
seataio/seata-server
Docker compose 启动
docker-compose.yaml
示例
version: "3"
services:
seata-server:
image: seataio/seata-server:${latest-release-version}
hostname: seata-server
ports:
- "8091:8091"
environment:
- SEATA_PORT=8091
- STORE_MODE=file
容器命令行及查看日志
$ docker exec -it seata-server sh
$ docker logs -f seata-server