AI智能体研发之路-工程篇(一):Docker助力AI智能体开发提效

在线体验各类最新模型,更有模型 免费Token 额度领取!
立即体验
简介: AI智能体研发之路-工程篇(一):Docker助力AI智能体开发提效

一、引言

由于近两年云原生热,大家对docker、docker compose及k8s或多或少都有一些涉猎,即便没有实际应用肯定也耳熟能详,今天对docker及docker compose的命令集进行梳理,大家可以收藏以便之后快速查阅。

二、docker常用命令

Common Commands(常用命令):

  •  run         Create and run a new container from an image(从一个image镜像创建并启动一个新的container容器)
  •  exec        Execute a command in a running container(在一个运行的container容器执行一段命令)
  •  ps          List containers(列出container容器,-a列出全部容器,不加-a列出运行的容器)
  •  build       Build an image from a Dockerfile(从Dockerfile配置文件创建一个image镜像)
  •  pull        Download an image from a registry(从dockerhub等资源库下载一个image镜像)
  •  push        Upload an image to a registry(推送一个镜像至资源库)
  •  images      List images(列出images镜像)
  •  login       Log in to a registry(登陆进一个资源库)
  •  logout      Log out from a registry(从资源库推出)
  •  search      Search Docker Hub for images(从dockerhub中搜索images镜像)
  •  version     Show the Docker version information(看docker的版本信息)
  •  info        Display system-wide information(查看docker附带的插件信息)

Commands:

  •  attach      Attach local standard input, output, and error streams to a running container()
  •  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
  •  export      Export a container's filesystem as a tar archive
  •  history     Show the history of an image
  •  import      Import the contents from a tarball to create a filesystem image
  •  inspect     Return low-level information on Docker objects(返回container或images的元数据)
  •  kill        Kill one or more running containers(杀死一个或更多个运行的container容器)
  •  load        Load an image from a tar archive or STDIN
  •  logs        Fetch the logs of a container(取出container容器运行日志)
  •  pause       Pause all processes within one or more containers
  •  port        List port mappings or a specific mapping for the container列出容器与宿主机的映射关系
  •  rename      Rename a container(重命名一个容器)
  •  restart     Restart one or more containers(重启一个或更多个container容器)
  •  rm          Remove one or more containers(删除一个或更多个container容器)
  •  rmi         Remove one or more images(删除一个或更多个image镜像)
  •  save        Save one or more images to a tar archive (streamed to STDOUT by default)
  •  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(对二次开发的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(更新一个或更多容器的配置)
  •  wait        Block until one or more containers stop, then print their exit codes

Management Commands(管理命令):

  •  builder     Manage builds
  •  buildx*     Docker Buildx (Docker Inc., v0.11.0)
  •  checkpoint  Manage checkpoints
  •  compose*    Docker Compose (Docker Inc., v2.19.1)
  •  container   Manage containers
  •  context     Manage contexts
  •  dev*        Docker Dev Environments (Docker Inc., v0.1.0)
  •  extension*  Manages Docker extensions (Docker Inc., v0.2.20)
  •  image       Manage images
  •  init*       Creates Docker-related starter files for your project (Docker Inc., v0.1.0-beta.6)
  •  manifest    Manage Docker image manifests and manifest lists
  •  network     Manage networks
  •  plugin      Manage plugins
  •  sbom*       View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
  •  scan*       Docker Scan (Docker Inc., v0.26.0)
  •  scout*      Command line tool for Docker Scout (Docker Inc., 0.16.1)
  •  system      Manage Docker
  •  trust       Manage trust on Docker images
  •  volume      Manage volumes

Swarm Commands:

  •  config      Manage Swarm configs
  •  node        Manage Swarm nodes
  •  secret      Manage Swarm secrets
  •  service     Manage Swarm services
  •  stack       Manage Swarm stacks
  •  swarm       Manage Swarm

Global Options:

  • --config string      Location of client config files (default "/Users/daoguang1/.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 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 "/Users/daoguang1/.docker/ca.pem")
  • --tlscert string     Path to TLS certificate file (default "/Users/daoguang1/.docker/cert.pem")
  • --tlskey string      Path to TLS key file (default "/Users/daoguang1/.docker/key.pem")
  • --tlsverify          Use TLS and verify the remote
  • -v, --version            Print version information and quit

三、docker compose常用命令

Commands(命令):

  •  build       Build or rebuild services
  •  config      Parse, resolve and render compose file in canonical format
  •  cp          Copy files/folders between a service container and the local filesystem
  •  create      Creates containers for a service.
  •  down        Stop and remove containers, networks
  •  events      Receive real time events from containers.
  •  exec        Execute a command in a running container.
  •  images      List images used by the created containers
  •  kill        Force stop service containers.
  •  logs        View output from containers
  •  ls          List running compose projects
  •  pause       Pause services
  •  port        Print the public port for a port binding.
  •  ps          List containers
  •  pull        Pull service images
  •  push        Push service images
  •  restart     Restart service containers
  •  rm          Removes stopped service containers
  •  run         Run a one-off command on a service.
  •  start       Start services
  •  stop        Stop services
  •  top         Display the running processes 列出容器组合中每个容器的进程,需要在docker-compose.yaml所在目录执行
  •  unpause     Unpause services
  •  up          Create and start containers 创建或启动容器组合,需要在docker-compose.yaml所在目录执行
  •  version     Show the Docker Compose version information 展示docker compose版本

Options(配置):

  •      --ansi string                Control when to print ANSI control characters ("never"|"always"|"auto") (default "auto")
  •      --compatibility              Run compose in backward compatibility mode
  •      --dry-run                    Execute command in dry run mode
  •      --env-file stringArray       Specify an alternate environment file.
  •  -f, --file stringArray           Compose configuration files
  •      --parallel int               Control max parallelism, -1 for unlimited (default -1)
  •      --profile stringArray        Specify a profile to enable
  •      --progress string            Set type of progress output (auto, tty, plain, quiet) (default "auto")
  •      --project-directory string   Specify an alternate working directory
  •                                   (default: the path of the, first specified, Compose file)
  •  -p, --project-name string        Project name

四、总结

现在不仅AI厂商卷,开源项目也卷的要命,基本上所有的开源项目都会将镜像上传至dockerhub,并且支持docker或者docker compose的一键部署,收藏一份命令集,随时用随时找。


目录
相关文章
|
9月前
|
人工智能 安全 API
20 万奖金池就位!Higress AI 网关开发挑战赛参赛指南
本次赛事共设三大赛题方向,参赛者可以任选一个方向参赛。本文是对每个赛题方向的参赛指南。
679 71
|
9月前
|
人工智能 监控 安全
提效40%?揭秘AI驱动的支付方式“一键接入”系统
本项目构建AI驱动的研发提效系统,通过Qwen Coder与MCP工具链协同,实现跨境支付渠道接入的自动化闭环。采用多智能体协作模式,结合结构化Prompt、任务拆解、流程管控与安全约束,显著提升研发效率与交付质量,探索大模型在复杂业务场景下的高采纳率编码实践。
846 26
提效40%?揭秘AI驱动的支付方式“一键接入”系统
|
9月前
|
人工智能 运维 安全
加速智能体开发:从 Serverless 运行时到 Serverless AI 运行时
在云计算与人工智能深度融合的背景下,Serverless 技术作为云原生架构的集大成者,正加速向 AI 原生架构演进。阿里云函数计算(FC)率先提出并实践“Serverless AI 运行时”概念,通过技术创新与生态联动,为智能体(Agent)开发提供高效、安全、低成本的基础设施支持。本文从技术演进路径、核心能力及未来展望三方面解析 Serverless AI 的突破性价值。
|
9月前
|
人工智能 运维 Java
Spring AI Alibaba Admin 开源!以数据为中心的 Agent 开发平台
Spring AI Alibaba Admin 正式发布!一站式实现 Prompt 管理、动态热更新、评测集构建、自动化评估与全链路可观测,助力企业高效构建可信赖的 AI Agent 应用。开源共建,现已上线!
8208 120
|
9月前
|
人工智能 量子技术
超越炒作:提示工程——与AI对话的艺术
超越炒作:提示工程——与AI对话的艺术
415 96
|
9月前
|
人工智能 架构师 数据挖掘
提示工程:与你AI对话的“超能力”
提示工程:与你AI对话的“超能力”
441 93
|
人工智能 自然语言处理 前端开发
产品经理也能“开发”需求?淘宝信息流从需求到上线的AI端到端实践
淘宝推荐信息流业务,常年被“需求多、技术栈杂、协作慢”困扰,需求上线周期动辄一周。WaterFlow——一套 AI 驱动的端到端开发新实践,让部分需求两天内上线,甚至产品经理也能“自产自销”需求。短短数月,已落地 30+ 需求、自动生成 5.4 万行代码,大幅提升研发效率。接下来,我们将揭秘它是如何落地并改变协作模式的。
1440 37
产品经理也能“开发”需求?淘宝信息流从需求到上线的AI端到端实践
|
9月前
|
人工智能 IDE 开发工具
从6人日到1人日:一次AI驱动的客户端需求开发实战
从6人日到1人日:一次AI驱动的客户端需求开发实战
从6人日到1人日:一次AI驱动的客户端需求开发实战

热门文章

最新文章