首页 > 其他分享 >[Container] Docker Objects

[Container] Docker Objects

时间:2024-03-22 15:14:17浏览次数:35  
标签:layer container image Objects Container Docker instructions

Docker objects

  • Dockerfile
    • A dockerfile is a editable text file that contains instructions needed to create an image in terminal.
    • The instructions docker provided:
      • FROM: Defines base image
      • RUN: Executes arbitrary commands
      • CMD: Defines default command for container execution
  • Image
    • Use for createing Docker containers and Read-only template with instructions
    • Built using instructions in a Dockerfie; a new read-only image layer is creaed for each instruction
    • A writeable layer is added when an image layer is created for each instruction
    • Layers can be shared between images, which saves disk space and network bandwidth
    • image naming: hostname/repository:tag, dockr.io/ubuntu:18.04
  • Container
    • arunnable instance of an image
    • Can be created, stopped, started or deleted using the Docker API or CLI
    • Can connect to multiple networks, attach storage, or create a new image based on its current state
    • Is well isolated from othe containers and its host machine
  • Network: Networks are used for the isolated container communication
  • Storage: Docker uses volumes and bind mounts to persist data even after a container stops
  • Other objects Plugins Add-ons: Storage plugins provide the ability to connect to external stroage platforms

标签:layer,container,image,Objects,Container,Docker,instructions
From: https://www.cnblogs.com/jbite9057/p/18089516

相关文章

  • ELK - Win10上使用Docker搭建ES集群
    Win10上使用Docker搭建ES集群ElasticSearch离线镜像包http://www.elastic-view.cn/index.htmlES可视化管理工具http://www.elastic-view.cn/index.html单机单节点启动命令:dockerrun-d--nameelasticsearch-p9200:9200-p9300:9300-enode.name=elasticsearch......
  • [Container] Building and Running Container Images
    Stepstocreateandruncontainers:1.CreateaDockerfile2.UsetheDockerfiletocreateacontainerimage3.UsethecontainerimagetocreatearunningcontainerDockerfileexampleFROMalpine#DefinesthebaseimageCMD["echo","Hel......
  • Deepin-安装Docker
    1deepin版本社区版20.7.12安装依赖包sudoapt-getupdatesudoapt-getinstall\apt-transport-https\ca-certificates\curl\gnupg-agent\software-properties-common-ycurl-fsSLhttps://download.docker.com/linux/ubuntu/gpg|sudo......
  • 定时备份docker日志(shell方式,可能存在丢部分日志)
    创建sh文件 vi~/backup_docker_log.sh #!bin/shif[!-d"/logs"];thenmkdir"/logs"ficd/logs/forfilein/var/lib/docker/containers/*doiftest-d$filethenecho$file是目录forlogfilein$file/*.log......
  • docker容器技术
    docker容器技术分享1.应用部署历史我们先来看看很久以前,服务器是怎么部署应用的。由于物理机部署的缺点,后来出现了虚拟机但是虚拟化也是有局限性的,每一个虚拟机都是一个完整的操作系统,要分配系统资源,虚拟机多到一定程度时,操作系统本身资源也就消耗殆尽,或者说必须扩容。2.......
  • [Container] study goals for learning container
    LearningObjectivesBuildacontainerimageandstoreitinacontainerregistry.Describethefeatures,benefits,andusecasesofcontainers,andhowtheyaredifferentfromvirtualmachines.DefineDockerandlistsomeofthecommonlyusedDockerCLI......
  • <爬虫部署,进阶Docker>----第十章 探究一下Docker Compose
    前言:        DockerCompose是一个用于定义和运行多容器应用程序的工具,它提供了一种简化和自动化容器编排的方式。在理解DockerCompose的背景之前,让我们先回顾一下容器化技术的发展。容器化技术的出现使得应用程序的部署和管理变得更加轻松和灵活。容器化通过......
  • docker上安装上常用软件
    常用得几个安装为例:安装tomcatmysqlredis总体步骤如下:  一.安装tomcat 1.dockersearchtomcat命令search,获取取到dockerhub官网直接输入tomcat去查找也是一样得。2.dockerpulltomcat3.dockerimagestomcat4.dockerrun-it-ptomcat ......
  • 自动化构建Docker镜像的标准方法(一篇带你了解)
    Dockerfile是一个文本文件,开发者使用它来定义如何构建一个Docker镜像。它是自动化构建Docker镜像的标准方法,包含了用于构建镜像的一系列指令,这些指令会被Docker引擎按顺序逐行解析并执行。构建镜像时,通过在命令行中运行dockerbuild并指定Dockerfile所在的路径来创建......
  • Docker指令
    systemctlstartdocker启动dockersystemctlstopdocker关闭dockersystemctlstatusdocker查看运行状态systemctlrestartdocker重启dockersystemctlpull镜像名拉去镜像dockerrun镜像名运行镜像dockerrmi-f镜像名/镜像Iddockerrmi-f$(dockerimage-......