docke-compose启动cockroach
前言
cockroach,蟑螂数据库。
编排文件
version: '3'
services:
pgweb:
image: cockroachdb/cockroach:latest
container_name: cockroach
command: start-single-node --insecure
ports:
- "8080:8080"
- "26257:26257"
volumes:
- ./cockroach-data:/cockroach/cockroach-data
restart: always
查看结果
[root@dev-python cockroach]# docker-compose ps
Name Command State Ports
-----------------------------------------------------------------------------------------------------
cockroach /cockroach/cockroach.sh st ... Up 0.0.0.0:26257->26257/tcp, 0.0.0.0:8080->8080/tcp