1 从安装和删除语句说起

1 docker引擎安装语句

sudo apt-get install  docker-ce  docker-ce-cli  containerd.io

2 docker引擎删除语句

sudo apt-get remove docker docker-engine docker.io containerd runc

那么什么是 docker-ce  docker-ce-cli  containerd.io ?

2  Docker引擎:启动-停止-查看

1  要如何启动docker引擎?

systemctl start docker 或 sudo systemctl restart docker

2  要如何关闭docker引擎?

systemctl stop docker

3  如何查看docker引擎?

systemctl status docker

3 关于docker-hub:查看-拉取-登录

1  查看码头上各个公有仓库的镜象

docker search nvidia                   ;查看带nvidia的镜像

docker search opencv                 ;查看带opencv的镜像

2 拉取(下载)镜像

docker pull    name-image          ;从仓库查到的镜像名称

3 进入自己的私有仓库(在docker-hub上)

docker registry

4 关于Images:的镜像操作(抽取、查看、实例化)

(一)产生和消灭images:

1 从hub上拉取镜像

docker  pull    name-image

2  删除本地镜像
docker  rmi  id(镜像的标识)

3 创造本地镜像

docker  build  -t  new_image_name:tag

(二) 查看本地镜像

docker images

(三)从镜像生成容器

docker  run  xxxxxxxxx语句

docker run -d

docker run -d -p 5672:5672 -p 15672:15672 --name rabbitmq 80bd4b95a49d

(四)镜像和本地文件转化

4. 镜像的导入导出(不规范)
# 将本地的镜像导出
docker save -o 导出的路径 镜像id
# 加载本地的镜像文件
docker load -i 镜像文件
# 修改镜像名称
docker tag 镜像id 新镜像名称:版本

附录:docker命令集合

Usage:  docker [OPTIONS] COMMAND

A self-sufficient runtime for containers

Options:
      --config string      Location of client config files (default "/home/huatec/.docker")
  -c, --context string     Name of the context to use to connect to the daemon (overrides
                           DOCKER_HOST env var and default context set with "docker context use")
  -D, --debug              Enable debug mode
  -H, --host list          Daemon socket(s) to connect to
  -l, --log-level string   Set the logging level ("debug"|"info"|"warn"|"error"|"fatal") (default
                           "info")
      --tls                Use TLS; implied by --tlsverify
      --tlscacert string   Trust certs signed only by this CA (default "/home/huatec/.docker/ca.pem")
      --tlscert string     Path to TLS certificate file (default "/home/huatec/.docker/cert.pem")
      --tlskey string      Path to TLS key file (default "/home/huatec/.docker/key.pem")
      --tlsverify          Use TLS and verify the remote
  -v, --version            Print version information and quit

docker管理命令:

app*        Docker App (Docker Inc., v0.9.1-beta3)
  builder     Manage builds
  buildx*     Build with BuildKit (Docker Inc., v0.6.3-docker)
  config      Manage Docker configs
  container   Manage containers
  context     Manage contexts
  image       Manage images
  manifest    Manage Docker image manifests and manifest lists
  network     Manage networks
  node        Manage Swarm nodes
  plugin      Manage plugins
  scan*       Docker Scan (Docker Inc., v0.8.0)
  secret      Manage Docker secrets
  service     Manage services
  stack       Manage Docker stacks
  swarm       Manage Swarm
  system      Manage Docker
  trust       Manage trust on Docker images
  volume      Manage volumes

Commands:
  attach      Attach local standard input, output, and error streams to a running container
  build       Build an image from a Dockerfile
  commit      Create a new image from a container's changes
  cp          Copy files/folders between a container and the local filesystem
  create      Create a new container
  diff        Inspect changes to files or directories on a container's filesystem
  events      Get real time events from the server
  exec        Run a command in a running container
  export      Export a container's filesystem as a tar archive
  history     Show the history of an image
  images      List images
  import      Import the contents from a tarball to create a filesystem image
  info        Display system-wide information
  inspect     Return low-level information on Docker objects
  kill        Kill one or more running containers
  load        Load an image from a tar archive or STDIN
  login       Log in to a Docker registry
  logout      Log out from a Docker registry
  logs        Fetch the logs of a container
  pause       Pause all processes within one or more containers
  port        List port mappings or a specific mapping for the container
  ps          List containers
  pull        Pull an image or a repository from a registry
  push        Push an image or a repository to a registry
  rename      Rename a container
  restart     Restart one or more containers
  rm          Remove one or more containers
  rmi         Remove one or more images
  run         Run a command in a new container
  save        Save one or more images to a tar archive (streamed to STDOUT by default)
  search      Search the Docker Hub for images
  start       Start one or more stopped containers
  stats       Display a live stream of container(s) resource usage statistics
  stop        Stop one or more running containers
  tag         Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
  top         Display the running processes of a container
  unpause     Unpause all processes within one or more containers
  update      Update configuration of one or more containers
  version     Show the Docker version information
  wait        Block until one or more containers stop, then print their exit codes

docker-engine安装好了,下一步该做什么?相关推荐

  1. Docker Engine 安装时遇到的坑

    记录最近学习Docker on CentOS遇到的一些安装与配置问题 1.使用一键安装脚本安装失败 curl -fsSL https://get.docker.com | bash -s docker ...

  2. 在Ubuntu上安装Docker Engine

    前提条件 操作系统要求 要安装Docker Engine,您需要以下Ubuntu版本之一的64位版本: Ubuntu Eoan 19.10 Ubuntu Bionic 18.04(LTS) Ubunt ...

  3. 【Docker】在CentOS上安装Docker Engine

    前提条件 操作系统要求 要安装Docker Engine,您需要CentOS 7的维护版本.不支持或未测试存档版本. 该centos-extras库必须启用.默认情况下,此存储库是启用的,但是如果已禁 ...

  4. Linux Mint 安装 Docker Engine

    Linux Mint 是基于 Ubuntu 和 Debian 的 Linux 发行版本,个人感觉用起来比 Ubuntu 丝滑一些,所以作为常用的 Linux 桌面 OS. 我用的是 Linux Min ...

  5. 获取 Docker(3)安装 Docker Engine

    支持的平台 Docker 引擎可 通过 Docker 桌面在各种Linux 平台. macOS和Windows 10 上使用,并作为静态二进制安装.在下面找到您喜欢的操作系统. 桌面 平台 x86_6 ...

  6. 安装docker、docker engine和docker desktop区别

    前言 安装docker时,官网有docker desktop和docker engine两种,这两种有什么不同?应该安装哪种呢? docker engine vs docker desktop doc ...

  7. Docker Engine在CentOS上的安装

    https://docs.docker.com/engine/install/centos/ 目录 Install Docker Engine on CentOS Prerequisites OS r ...

  8. 第12章 CentOS7 中 Docker 的安装与配置

    第08章 CentOS7 中 Docker 的安装与配置 Docker 是什么? Docker 是世界领先的软件容器平台.[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img- ...

  9. WSL2 + Docker + xfce4安装及使用

    WSL2 + Docker + xfce4安装及使用 WSL官方指南:适用于 Linux 的 Windows 子系统安装指南 (Windows 10) 文档比较详细,而且会持续更新,欢迎大家指错. 文 ...

最新文章

  1. 谷歌新操作系统Fuchsia网站上线,同时支持手机和PC,鼓励开发者参与进来
  2. linux c 编译报错 Compile error : undefined reference to‘__atomic_fetch_add_4’ 解决方法
  3. java递增不使用循环_[转]Java 8:不要再用循环了
  4. 手把手教你建网站--程序小白适用篇
  5. java线程分类_Java 线程类别
  6. php base64安全吗,php base64
  7. 数字42 它的C++二进制代码为 00101010
  8. 语义分割未来发展如何?
  9. 数据结构可视化工具(在线,动态生成,用过都说好!)
  10. Ubuntu安装Matlab
  11. idea怎么集成svn服务端,使用Mac自带svn搭建服务器,并使用idea进行连接(示例代码)...
  12. 多周期MIPS CPU硬布线控制器设计
  13. Visual Studio 2022配置GAMP出现 LNK2019无法解析外部符号_imp_timeGetTime@0
  14. 3D远方动态白云页面源码
  15. FcaNet: Frequency Channel Attention Networks
  16. 如何封装svg矢量图
  17. SpringBoot + Java生成证书
  18. GBase XDM 模型概要
  19. Django期末考试复习
  20. 【Linux】Linux安装nginx操作详细步骤

热门文章

  1. 文巾解题 196. 删除重复的电子邮箱
  2. Linux疑难杂症解决方案100篇(二十)-万字长文带你读懂正则表达式(建议收藏)
  3. Matlab分布式和并行编程
  4. LeetCode-位运算-36. 只出现一次的数字
  5. QT一次性连接多个按钮槽函数
  6. 支付宝扫一下就能体验的深度学习模型
  7. 【风险管理】信贷核心业务流程
  8. 【数据挖掘】数据挖掘简介
  9. Inchat时代真的来了?上线一周突破百万用户
  10. Learning to Rank 中Listwise关于ListNet算法讲解及实现