Category:Docker

From ElectroDragon
Jump to navigation Jump to search


Repository

Run a Ubuntu OS in docker

  • install docker pull ubuntu
  • enter into system docker run -ti ubuntu bash

Alpine

Ubuntu

Repository: SDK

Licheee Pi

  • docker search licheepi #搜索镜像
  • docker pull zepan/licheepi #下载镜像
  • docker run zepan/licheepi apt-get install -y xxx #在镜像中执行命令,安装某软件
  • docker commit -m="install something" -a="zepan" container_id zepan/licheepi
  • docker login
  • docker push zepan/licheepi

Docker clean

  • container, images, volumes, network
  • docker rm -f -v $(docker ps -a -q) && docker rmi $(docker images -a -q) && docker volume rm $(docker volume ls -q) && docker network prune

one by one remove with volumes or not

  • docker rm -f -v $(docker ps -a -q)
  • docker rm -f $(docker ps -a -q)

images, volumes, network

  • docker rmi $(docker images -a -q)
  • docker volume rm $(docker volume ls -q)
  • docker network prune

Document

Other references

docker下各文件默认存放在/var/lib/docker下

du -h --max-depth=1 /var/lib/docker                #查看docker目录大小

Subcategories

This category has only the following subcategory.

Pages in category "Docker"

The following 5 pages are in this category, out of 5 total.