docker run -i -t ubuntu /bash/bin
docker run -i -t --name = wnagshumin ubuntu /bash/bin
docker run ubuntu /bash/bin
docker ps 在运行的
docker ps -a 所有的
docker ps -l
docker start -i id 启动停止的容器
docker rm id 删除停止的容器
docker run -i -t ubuntu /bash/bin
ctr +p or ctrl +p
dcoker ps
docker attach id
ctr +p 退出 但是容器不停止
docker ps
docker attach id 进入容器
exit 退出 但是容器停止
docker ps
docker run --name = con1 -d ubuntu bin/bash -c "while true ; do echo wnagshumin ;sleep 1;done ;"
dcoker ps
sudo docker logs -t -f --tail 10 container2 查看运行的日志
docker ps
docker top con1 查看容器内运行的进程
docker exec -d -i -t con1 /bin/bash 在运行的容器内 运行新的进程
查看容器内运行的进程
docker top con1
docker stop id 停止守护运行的容器 发信号
docker kill id 停止守护运行的容器 快速停止容器
docker ps 正在运行的容器
大写-P
dokcer run -P -i - t ubuntu /bin/bash/
小写-p
dokcer run -p 80 -i - t ubuntu /bin/bash/
docker run -p 8080:80 -i -t ubuntu /bin/bash 一yi对应
docker run -p 0.0.0.0:8080:80 -i -t ubuntu /bin/bash 一yi对应
dokcer run -p 80 --name doc1 -i - t ubuntu /bin/bash/
在容器中运行安装命令
docker port doc1 查看端口映射情况
docker top doc1 查看容器内运行的进程
curl http://127.0.0.1:49167 访问 or 也可在浏览器中访问这个页面
docker inspect doc1 查看容器的ip
docker ps
docker stop doc1
docker start -i doc1 启动停止的容器 容器的ip改变了和端口
ps -ef 在容器中查看 进程
docker exec doc1 nginx 在容器中启动 nginx进程
docker images 在docker中安装的镜像
docker images -a 所有的镜像 包含中间层镜像
docker images centos
docker inpect 镜像
docker rmi id 删除镜像
docker images 查镜像
docker search ubuntu 查找仓库
docker pull ubuntu:14.04 下载镜像
docker images 查看下在的镜像
自己构建的镜像上传
docker push 镜像
构建镜像
docker commit 通过容器构建
docker bulid 通过dockerfile构建镜像
docker build -t ="testimages" 构建镜像
dcoker run -d --name con1 -p 80 testimages
ps -ef | grep dcoker
sudo status docker
sudo servce dcoker stop 停止docker
sudo servce docker start docker 启动
docker run -i -t --name = wnagshumin ubuntu /bash/bin
docker run ubuntu /bash/bin
docker ps 在运行的
docker ps -a 所有的
docker ps -l
docker start -i id 启动停止的容器
docker rm id 删除停止的容器
docker run -i -t ubuntu /bash/bin
ctr +p or ctrl +p
dcoker ps
docker attach id
ctr +p 退出 但是容器不停止
docker ps
docker attach id 进入容器
exit 退出 但是容器停止
docker ps
docker run --name = con1 -d ubuntu bin/bash -c "while true ; do echo wnagshumin ;sleep 1;done ;"
dcoker ps
sudo docker logs -t -f --tail 10 container2 查看运行的日志
docker ps
docker top con1 查看容器内运行的进程
docker exec -d -i -t con1 /bin/bash 在运行的容器内 运行新的进程
查看容器内运行的进程
docker top con1
docker stop id 停止守护运行的容器 发信号
docker kill id 停止守护运行的容器 快速停止容器
docker ps 正在运行的容器
大写-P
dokcer run -P -i - t ubuntu /bin/bash/
小写-p
dokcer run -p 80 -i - t ubuntu /bin/bash/
docker run -p 8080:80 -i -t ubuntu /bin/bash 一yi对应
docker run -p 0.0.0.0:8080:80 -i -t ubuntu /bin/bash 一yi对应
dokcer run -p 80 --name doc1 -i - t ubuntu /bin/bash/
在容器中运行安装命令
docker port doc1 查看端口映射情况
docker top doc1 查看容器内运行的进程
curl http://127.0.0.1:49167 访问 or 也可在浏览器中访问这个页面
docker inspect doc1 查看容器的ip
docker ps
docker stop doc1
docker start -i doc1 启动停止的容器 容器的ip改变了和端口
ps -ef 在容器中查看 进程
docker exec doc1 nginx 在容器中启动 nginx进程
docker images 在docker中安装的镜像
docker images -a 所有的镜像 包含中间层镜像
docker images centos
docker inpect 镜像
docker rmi id 删除镜像
docker images 查镜像
docker search ubuntu 查找仓库
docker pull ubuntu:14.04 下载镜像
docker images 查看下在的镜像
自己构建的镜像上传
docker push 镜像
构建镜像
docker commit 通过容器构建
docker bulid 通过dockerfile构建镜像
docker build -t ="testimages" 构建镜像
dcoker run -d --name con1 -p 80 testimages
ps -ef | grep dcoker
sudo status docker
sudo servce dcoker stop 停止docker
sudo servce docker start docker 启动