Sep 18 10:20:54 iZn7mhh83qcz712ozfi0jpZ dockerd[9383]: time="2018-09-18T10:20:54.005950166+08:00" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc420421160, READY" module=grpcSep 18 10:20:54 iZn7mhh83qcz712ozfi0jpZ dockerd[9383]: time="2018-09-18T10:20:54.013755489+08:00" level=warning msg="Usage of loopback devices is strongly discouraged for production use. Please use `--storage-optSep 18 10:20:54 iZn7mhh83qcz712ozfi0jpZ systemd-udevd[9295]: inotify_add_watch(7, /dev/dm-3, 10) failed: No such file or directorySep 18 10:20:54 iZn7mhh83qcz712ozfi0jpZ dockerd[9383]: time="2018-09-18T10:20:54.253238383+08:00" level=info msg="Creating filesystem xfs on device docker-253:1-1064453-base, mkfs args: [-m crc=0,finobt=0 /dev/maSep 18 10:20:54 iZn7mhh83qcz712ozfi0jpZ dockerd[9383]: time="2018-09-18T10:20:54.254023042+08:00" level=info msg="Error while creating filesystem xfs on device docker-253:1-1064453-base: exit status 1" storage-drSep 18 10:20:54 iZn7mhh83qcz712ozfi0jpZ dockerd[9383]: time="2018-09-18T10:20:54.254050362+08:00" level=error msg="[graphdriver] prior storage driver devicemapper failed: exit status 1"Sep 18 10:20:54 iZn7mhh83qcz712ozfi0jpZ dockerd[9383]: Error starting daemon: error initializing graphdriver: exit status 1Sep 18 10:20:54 iZn7mhh83qcz712ozfi0jpZ systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURESep 18 10:20:54 iZn7mhh83qcz712ozfi0jpZ systemd[1]: Failed to start Docker Application Container Engine.
1 2 INFO[2018-09-15T10:47:40.220046362+08:00] Creating filesystem xfs on device docker-253:4-17133027-base, mkfs args: [-m crc=0,finobt=0 /dev/mapper/docker-253:4-17133027-base] storage-driver=devicemapper
解决办法
yum install xfsprogs
安装
wget https://storage.googleapis.com/kubernetes-release/release/v1.8.15/kubernetes-server-linux-amd64.tar.gz
wget https://storage.googleapis.com/kubernetes-release/release/v1.8.15/kubernetes-node-linux-amd64.tar.gz
UI界面
kubectl create -f kubernetes-dashboard.yaml
删除
kubectl delete -f kubernetes-dashboard.yaml
查看状态
kubectl get pods
kubectl get ns
kubectl get pods -n kube-system
kubectl describe pod kubernetes-dashboard-74cbf9fffc-69p4v -n kube-system
查看所有服务
kubectl get services --all-namespace
查看端口
kubectl get svc -n kube-system
docker-registry
vi /usr/lib/systemd/system/docker.service
docker pull hub.c.163.com/library/registry:latest
docker tag 0bb8b1006103 registry docker images docker tag 751f286bc25e registry加删除权限
docker run -d -p 5000:5000 -v /opt/registry:/var/lib/registry -e "REGISTRY_STORAGE_DELETE_ENABLED=true" registry运行镜像
docker run -t -i wangwei/tomcat8-web /bin/bash
1.停止所有的container,这样才能够删除其中的images:
docker stop $(docker ps -a -q)
如果想要删除所有container的话再加一个指令:
docker rm $(docker ps -a -q)
2.查看当前有些什么images
docker images
3.删除images,通过image的id来指定删除谁
docker rmi <image id>
想要删除untagged images,也就是那些id为<None>的image的话可以用
docker rmi $(docker images | grep "^<none>" | awk "{print $3}")
要删除全部image的话
docker rmi $(docker images -q)
镜像修改
docker run -t -i wangwei/tomcat8-web /bin/bash
docker commit -m "edit tomcat" -a "wangwei" 867264b79438 172.16.22.61:5000/wangwei/tomcat8-web:v1
docker push 172.16.22.61:5000/wangwei/tomcat8-web
查看父image
docker image inspect --format='{
{.RepoTags}} { {.Id}} { {.Parent}}' $(docker image ls -q --filter since=xxxxxx)docker commit了一个镜像之后想删除旧的镜像,出现以下报错
Error response from daemon: conflict: unable to delete 6f8214d56bfc (cannot be forced) - image has dependent child images
解决思路:
docker save保存容器
docker images
docker save REPOSITORY > XX.tar
删除镜像容器
docker ps -a
docker rm CONTAINER ID
docker images
docker rmi IMAGE ID
最后再导入回去
docker load < XX.tar