标签:基本 dia rmi latest oca 没有 log port 登录
docker run --name zookeeper -p 2081:2181 -d zookeeper
docker exec -it ce1ca3255bf9 /bin/bash (ce1ca3255bf9 为容器的id)
[root@localhost ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
093836e28379 zookeeper:latest "/docker-entrypoint.…" 10 minutes ago Up 6 minutes 2181/tcp, 2888/tcp, 0.0.0.0:2018->2018/tcp, 3888/tcp zk2
839bd3b5d358 zookeeper "/docker-entrypoint.…" About an hour ago Up 43 minutes 2181/tcp, 2888/tcp, 0.0.0.0:2019->2019/tcp, 3888/tcp zk1
docker ps -a
docker run --name zk3 -p 2017:2017 -di zookeeper
docker exec -it zk3 /bin/bash
docker run -di -p 2018:2018 -v /root/dockerfile:/conf --name=zk2 zookeeper:latest
docker rm zk2
docker rmi zookeeper
标签:基本 dia rmi latest oca 没有 log port 登录
原文地址:https://www.cnblogs.com/xietianhua/p/11345803.html