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

简介: 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的一键部署,收藏一份命令集,随时用随时找。


目录
打赏
0
0
0
0
18
分享
相关文章
智能体(AI Agent)开发实战之【LangChain】(二)结合大模型基于RAG实现本地知识库问答
智能体(AI Agent)开发实战之【LangChain】(二)结合大模型基于RAG实现本地知识库问答
AI+Code驱动的M站首页重构实践:从技术债务到智能化开发
本文分享了阿里巴巴找品M站首页重构项目中AI+Code提效的实践经验。面对M站技术栈陈旧、开发效率低下的挑战,我们通过楼层动态化架构重构和AI智能脚手架,实现了70%首页场景的标准化覆盖 + 30%的非标场景的研发提速,开发效率分别提升90%+与40%+。文章详细介绍了楼层模板沉淀、AI辅助代码生成、智能组件复用评估等核心实践,为团队AI工程能力升级提供了可复制的方法论。
183 15
AI+Code驱动的M站首页重构实践:从技术债务到智能化开发
探讨AI数字人软件系统的开发与部署策略
随着科技发展,人工智能成为经济转型的关键驱动力,AI数字人软件系统在各行业广泛应用。本文探讨其开发与部署策略,助力企业和开发者参考。开发策略包括需求分析、技术选型、模块化设计、数据驱动及安全性保障;部署策略涵盖硬件环境、软件配置、分布式与云端部署以及运维保障,推动系统智能化与稳定性提升。
智能体(AI Agent)开发实战之【LangChain】(一)接入大模型输出结果
LangChain 是一个开源框架,专为构建与大语言模型(LLMs)相关的应用设计。通过集成多个 API、数据源和工具,助力开发者高效构建智能应用。本文介绍了 LangChain 的环境准备(如安装 LangChain、OpenAI 及国内 DeepSeek 等库)、代码实现(以国内开源大模型 Qwen 为例,展示接入及输出结果的全流程),以及核心参数配置说明。LangChain 的灵活性和强大功能使其成为开发对话式智能应用的理想选择。
解锁数仓内AI流水线,AnalyticDB Ray基于多模ETL+ML提效开发与运维
AnalyticDB Ray 是AnalyticDB MySQL 推出的全托管Ray服务,基于开源 Ray 的丰富生态,经过多模态处理、具身智能、搜索推荐、金融风控等场景的锤炼,对Ray内核和服务能力进行了全栈增强。
通义灵码 AI IDE 上线!智能体+MCP 从手动调用工具过渡到“AI 主动调度资源”
编程智能体与 MCP 的结合,不只是“工具+助手”,而是一次范式上的跃迁——从“手动调用工具”过渡到“AI 主动调度资源”。
通义灵码2.5评测:从编程智能体到记忆感知的AI编码革命
通义灵码2.5版本更新带来了多项新功能,包括Lingma IDE的开箱即用体验、编程智能体模式实现端到端编码任务、MCP工具集成扩展AI助手能力以及Qwen3模型升级大幅提升代码生成准确性和效率。此外,新增长期记忆与上下文感知功能,使开发更个性化和高效。尽管存在一些局限性,如复杂业务逻辑仍需人工干预,但整体显著提升了开发效率。官方还提供了高质量视频课程助力用户学习。
442 10
通义灵码 AI IDE 正式上线,智能体自动写代码,首创自动记忆,工程感知全面升级
阿里云发布的通义灵码AI IDE深度适配千问3大模型,集成智能编码助手功能,支持编程智能体、工具调用、工程感知等能力。其核心亮点包括:支持最强开源模型千问3,全面集成通义灵码插件能力,自带编程智能体模式,支持长期记忆与行间建议预测(NES)。通义灵码已覆盖主流IDE,助力开发者实现高效智能编程,插件下载量超1500万,生成代码超30亿行,成为国内最受欢迎的辅助编程工具。立即体验更智能的开发流程!
328 0

热门文章

最新文章

AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等

登录插画

登录以查看您的控制台资源

管理云资源
状态一览
快捷访问