ubuntu
- 下载镜像
docker pull hub.c.163.com/public/ubuntu:16.04-tools
- 运行容器
docker run -d -name ubuntu hub.c.163.com/public/ubuntu /bin/sh -c "while true;do sleep;done"
- 查看运行时容器
docker ps
结果如下:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
cc47f4cade00 hub.c.163.com/public/ubuntu:16.04-tools "/bin/sh -c 'while t…" 10 minutes ago Up 10 minutes 22/tcp ubuntu
- 进入容器
docker exec -it cc47f4cade00 /bin/sh
网友评论