{
  "source_file": "0930",
  "source_platform": "Ghost",
  "author": "Peng Qian / Data Leads Future",
  "title_listed": "A Quick Guide to Containerizing Agent Applications with Podman",
  "keywords": "",
  "domain": "大模型算法",
  "content_type": "工程实践",
  "is_paid_flag": "否",
  "url": "https://www.dataleadsfuture.com/a-quick-guide-to-containerizing-agent-applications-with-podman/",
  "publish_date": "2025-12",
  "corpus_stage": "",
  "notes": "",
  "id": "891046998436",
  "collected_at": "2026-10-02T12:27:39",
  "title": "A Quick Guide to Containerizing Agent Applications with Podman",
  "body_markdown": "Agentic AI\nA Quick Guide to Containerizing Agent Applications with Podman\nAlternative solutions compatible with Docker SDK\nPeng Qian\n04 Dec 2025\n—\n7 min read\nShare\nA Quick Guide to Containerizing Agent Applications with Podman. Image by DALL-E-3\nIntroduction\nFor enterprise-level agent applications, the best way to safely run code generated by agents is to use containerization. This isolates the code execution environment from your server’s operating system.\nIn a previous article, we built a code interpreter sandbox based on a Jupyter container. We proved that once an agent has access to a stateful code runtime, it gains the ability to solve complex problems and perform data analysis:\nExclusive Reveal: Code Sandbox Tech Behind Manus and Claude Agent Skills\nUse Jupyter code executor to help your agent finish tasks in a smarter way\nData Leads Future\nPeng Qian\nHowever, Docker Desktop is off-limits in most enterprises due to its commercial license restrictions.\nYet our multi-agent development work absolutely depends on a containerized environment. So we must find a suitable alternative. Ideally, one fully compatible with Docker, so it works seamlessly with existing agent frameworks that rely on the Docker client.\nPodman is exactly what we need. Developed by Red Hat, it’s an open-source container management tool that runs on both Mac and Windows. It can fully replace Docker Desktop in your development setup.\nThis short post will help you quickly set up Podman so you can start building agent applications with code interpreters right away. If you’d like deeper background knowledge and a more thorough introduction to Podman, I highly recommend the\nPodman for the Absolute Beginners - Hands-On DevOps course on Udemy\n.\nQuick Start\nPrerequisites\nThis guide assumes you’re developing on Windows 11. From what I know, setup on Mac is even simpler.\nPodman runs its host inside a Linux system on WSL2. So before proceeding, make sure you’ve already installed WSL2 on your machine.\nIf your company requires a VPN to access the internet, you’ll also need to configure WSL2. To do this, create a\n.wslconfig\nfile in your Windows\n%USERPROFILE%\ndirectory (your user folder) with the following content:\n[experimental]\nautoMemoryReclaim=gradual  \nnetworkingMode=mirrored\ndnsTunneling=true\nfirewall=true\nautoProxy=true\nInstall Podman\nAs mentioned, Podman’s host runs in a WSL2-based Linux environment called\npodman-machine-default\n. So when installing Podman, you actually need to set up this\npodman-machine-default\n.\nOne approach is to install Podman Desktop first, then create the\npodman-machine-default\nthrough its interface. But for some reason, this always failed for me—the installer would just hang.\nSo I went the other way: I installed\npodman-machine\nstandalone first, then installed Podman Desktop. Go to Podman’s\nGitHub Releases page\n, download the latest\n.msi\ninstaller, and run it.\nFind and download the .msi installer under the latest release. Image by Author\nAfter installation, create your\npodman-machine-default\nhost:\npodman machine init --rootful=true\nImportant note: if your agent framework uses the Docker SDK to launch containers, you\nmust\nset\n--rootful=true\n. I’ll explain why later.\nNext, install Podman Desktop from\nhere\n. Just click “Next” all the way through.\nOnce done, open Podman Desktop from your taskbar, go to the\nSettings\ntab, and check\nResources\n. You should see the\npodman-machine\nyou just created. That means Podman Desktop is ready.\nIf you see this screen, it means your Podman Desktop is already installed. Image by Author\nBut since your agents will use the Docker SDK to manage containers, you need to enable Docker compatibility in Podman Desktop, as shown below:\nWe use the Docker SDK to manage containers in our agent framework, so make sure Docker Compatibility is turned on. Image by Author\nThis setting also enables Podman Compose, which lets you route\ndocker compose\ncommands to\npodman compose\n.\nSet up proxy configuration\nIf your system uses a system-wide proxy, Podman Desktop will automatically pick it up. But here’s the catch: Podman Desktop applies these settings inside the\npodman-machine\nLinux system. Unlike Windows, where bypass domains are separated by semicolons, Linux uses commas. You’ll need to manually adjust this, or your\npodman-machine\nmight lose external network access.\nYou should use the Linux path separator here. Image by Author\nCreate a soft link for the storage path\nBy default, Podman stores data in\n%USERPROFILE%\\.local\\share\\containers\\podman\n.\nI really dislike keeping data files on the C drive. I prefer moving them to D drive—for example,\nD:\\Documents\\AppData\\podman\n.\nHere’s how: copy everything from the C-drive\npodman\nfolder to your new D-drive location, delete the original C-drive folder, then create a junction link (remember to replace\n%USERPROFILE%\nwith your actual path):\nmklink /j C:\\Users\\qianpeng\\.local\\share\\containers\\podman D:\\Documents\\AppData\\podman\nNow everything works normally, but your data lives safely on D drive—no risk of losing it during a system reinstall.\nTest your Podman installation\nIf you followed my\nearlier article\nand created a\nDockerfile\nfor a\njupyter-server\n, you can now test whether Podman builds images correctly. Navigate to your\nDockerfile\ndirectory and run:\npodman build --network=host -t jupyter-server .\nRemember, the\npodman-machine\nhost is network-isolated from your Windows system. The\n--network=host\nflag lets the build process access your Windows network, making it easier to pull base images and install Python packages from PyPI.\nNote: this flag only affects image building—it has no impact when running containers.\nMake Docker CLI commands work\nIf you’re used to typing\ndocker\ncommands, here’s a neat trick: create a\ndocker.bat\nfile in\n%USERPROFILE%/.local/bin\n(Make sure this path is in your system\nPATH\n).\nPut this inside\ndocker.bat\n:\n@echo off\nsetlocal EnableDelayedExpansion\nif \"%~1\"==\"build\" (\n\tshift\n\trem Default to --network=host\n\tpodman build --network=host %2 %3 %4 %5 %6 %7 %8 %9\n) else (\n\tpodman %*\n)\nendlocal\nNow you can keep using\ndocker\ncommands as usual. Since Podman’s CLI is mostly compatible with Docker’s, everything feels the same—except when you run\ndocker build\n, it automatically adds\n--network=host\nto the underlying\npodman build\ncommand.\nCall Docker SDK from inside a containerized app\nIf your agent app runs inside a container and needs to use the Docker SDK to spin up Python code interpreter containers (a common pattern across agent frameworks), you’ll need to let the SDK talk to Podman.\nDo this by mounting the\npodman.sock\nsocket into your app container so the Docker SDK can reach it:\ndocker run -v /run/podman/podman.sock:/var/run/docker.sock --rm app-test\nAgain, your\npodman-machine-default\nmust\nbe initialized with\n--rootful=true\n.\nFix Docker SDK timeout issues\nWhen your agent generates code and sends it via Docker SDK to a code interpreter container, there’s often a delay between code generations while the LLM produces tokens. On the second SDK call, you might hit a timeout like this:\nrequests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))\nThis happens because\npodman-machine\nsets a very short\nservice_timeout\nfor its engine by default.\nFix it by SSHing into your\npodman-machine\n:\npodman machine ssh\nNow you’re in the Linux VM. Edit\n/etc/containers/containers.conf\n:\nsudo vi /etc/containers/containers.conf\nSet\nservice_timeout\nto 0 (meaning “never time out”) under the\n[engine]\nsection:\n[engine]\ncgroup_manager = \"cgroupfs\"\nservice_timeout = 0\nSince this is a dev environment, security isn’t a concern here.\nAdjust Podman container stop timeout\nDuring development, you often start and stop your agent program from the command line. But you might notice it takes forever to exit after the program finishes.\nThat’s because Podman waits by default (10 seconds!) for containers to gracefully shut down after receiving a stop signal.\nShorten this by editing the same config file:\n[engine]\nstop_timeout = 2\nNow containers stop in 2 seconds—much snappier!\nAllow Containers to Use the --restart Flag\nPodman lets you use the\n--restart\nflag when starting a container, just like Docker, so your containers can automatically start up again after your computer reboots.\nThe only thing you need to do first is set up\npodman-restart.service\ninside your podman-machine. Here's how:\nFirst, jump into podman-machine-default and run these shell commands:\n# Check the status of podman-restart.service\nsystemctl status podman-restart.service\n# Enable the service (so it starts on boot)\nsudo systemctl enable podman-restart.service\n# Start the service right now\nsudo systemctl start podman-restart.service\nThen create your container with the\n--restart\nflag:\npodman run -d -p 5000:5000 --name mlflow-server --restart=always mlflow-server\nOr if the container already exists, just update its restart policy:\npodman update --restart=always mlflow-server\nFinally, to make sure everything is set up correctly, run this in your Windows terminal:\npodman inspect mlflow-server --format='{{.HostConfig.RestartPolicy.Name}}'\nAnd that's it, you're good to go!\nConclusion\nEver since Gemini 3.0 accidentally deleted 800GB of user data, running agent-generated code inside containers has become essential. And yes—stateful code interpreters truly boost an agent’s ability to tackle complex problems.\nMost agent frameworks rely on the Docker SDK to manage containers. But Docker Desktop’s licensing blocks its use in enterprise dev environments.\nThis guide shows you how to use Podman Desktop as a drop-in replacement. Following these steps, you can quickly build a Docker-compatible container dev environment. I’ve used this exact setup for over six months with zero issues.\nThis article covers only the minimal setup needed for agent development. If you want to dive deeper into Podman’s internals and advanced usage, check out the official tutorials.\nOur journey toward\nDeep Data Analyst Agents\ncontinues—stay tuned for the next episode!\nFollow Data Leads Future\nOne practical story every month, sharing my hard-learned experiences in the enterprise AI space.\nSubscribe\nEmail sent! Check your inbox to complete your signup.\nYou can unsubscribe anytime.",
  "metadata": {
    "title": "A Quick Guide to Containerizing Agent Applications with Podman",
    "description": "Learn how to use Podman as a Docker Desktop alternative for containerizing AI agent applications—perfect for enterprise development with full Docker SDK compatibility.",
    "keywords": null,
    "author": null,
    "og:site_name": "Data Leads Future",
    "og:type": "article",
    "og:title": "A Quick Guide to Containerizing Agent Applications with Podman",
    "og:description": "Alternative solutions compatible with Docker SDK",
    "og:url": "https://www.dataleadsfuture.com/a-quick-guide-to-containerizing-agent-applications-with-podman/",
    "og:image": "https://storage.ghost.io/c/33/67/33678c00-2c15-4961-93e9-497b427e2006/content/images/size/w1200/2026/01/podman.webp",
    "og:image:width": "1200",
    "og:image:height": "686",
    "twitter:card": "summary_large_image",
    "twitter:title": "A Quick Guide to Containerizing Agent Applications with Podman",
    "twitter:description": "Alternative solutions compatible with Docker SDK",
    "twitter:url": "https://www.dataleadsfuture.com/a-quick-guide-to-containerizing-agent-applications-with-podman/",
    "twitter:image": "https://storage.ghost.io/c/33/67/33678c00-2c15-4961-93e9-497b427e2006/content/images/size/w1200/2026/01/podman.webp",
    "twitter:label1": "Written by",
    "twitter:data1": "Peng Qian",
    "twitter:label2": "Filed under",
    "twitter:data2": "Agentic AI, Generative AI",
    "twitter:site": "@qtalen",
    "twitter:creator": "@qtalen",
    "article:published_time": "2025-12-04T09:54:47.000Z",
    "article:modified_time": "2026-04-22T08:21:03.000Z",
    "article:tag": "Generative AI"
  },
  "paywall": {
    "listed_paid": false,
    "detected": false,
    "marker": "",
    "public_only": false,
    "policy": "付费/会员内容只保留页面公开可见部分，不绕过付费墙"
  },
  "crawl": {
    "success": true,
    "status_code": 200,
    "error": ""
  },
  "code_blocks": [
    {
      "file": "attachments/891046998436/code/body-000.txt",
      "chars": 113,
      "language": "text"
    },
    {
      "file": "attachments/891046998436/code/body-001.txt",
      "chars": 34,
      "language": "text"
    },
    {
      "file": "attachments/891046998436/code/body-002.txt",
      "chars": 86,
      "language": "text"
    },
    {
      "file": "attachments/891046998436/code/body-003.txt",
      "chars": 47,
      "language": "text"
    },
    {
      "file": "attachments/891046998436/code/body-004.txt",
      "chars": 183,
      "language": "text"
    },
    {
      "file": "attachments/891046998436/code/body-005.txt",
      "chars": 72,
      "language": "text"
    },
    {
      "file": "attachments/891046998436/code/body-006.txt",
      "chars": 129,
      "language": "text"
    },
    {
      "file": "attachments/891046998436/code/body-007.txt",
      "chars": 18,
      "language": "text"
    },
    {
      "file": "attachments/891046998436/code/body-008.txt",
      "chars": 39,
      "language": "text"
    },
    {
      "file": "attachments/891046998436/code/body-009.txt",
      "chars": 56,
      "language": "text"
    },
    {
      "file": "attachments/891046998436/code/body-010.txt",
      "chars": 25,
      "language": "text"
    },
    {
      "file": "attachments/891046998436/code/body-011.txt",
      "chars": 247,
      "language": "text"
    },
    {
      "file": "attachments/891046998436/code/body-012.txt",
      "chars": 78,
      "language": "text"
    },
    {
      "file": "attachments/891046998436/code/body-013.txt",
      "chars": 44,
      "language": "text"
    },
    {
      "file": "attachments/891046998436/code/body-014.txt",
      "chars": 74,
      "language": "text"
    }
  ],
  "images": [
    {
      "status": "ok",
      "url": "https://storage.ghost.io/c/33/67/33678c00-2c15-4961-93e9-497b427e2006/content/images/size/w1200/2026/01/podman.webp",
      "bytes": 100838,
      "reused": true,
      "local_path": "attachments/891046998436/images/000.webp",
      "src": "https://storage.ghost.io/c/33/67/33678c00-2c15-4961-93e9-497b427e2006/content/images/size/w1200/2026/01/podman.webp",
      "alt": "A Quick Guide to Containerizing Agent Applications with Podman.",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://storage.ghost.io/c/33/67/33678c00-2c15-4961-93e9-497b427e2006/content/images/icon/color_192_192-47.png",
      "bytes": 17721,
      "reused": false,
      "local_path": "attachments/891046998436/images/body-99603f67233742e839e6.png",
      "src": "https://storage.ghost.io/c/33/67/33678c00-2c15-4961-93e9-497b427e2006/content/images/icon/color_192_192-47.png",
      "alt": "",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://storage.ghost.io/c/33/67/33678c00-2c15-4961-93e9-497b427e2006/content/images/thumbnail/cover-7.webp",
      "bytes": 105414,
      "reused": true,
      "local_path": "attachments/891046998436/images/005.webp",
      "src": "https://storage.ghost.io/c/33/67/33678c00-2c15-4961-93e9-497b427e2006/content/images/thumbnail/cover-7.webp",
      "alt": "",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://storage.ghost.io/c/33/67/33678c00-2c15-4961-93e9-497b427e2006/content/images/2025/12/image.png",
      "bytes": 203720,
      "reused": true,
      "local_path": "attachments/891046998436/images/006.png",
      "src": "https://storage.ghost.io/c/33/67/33678c00-2c15-4961-93e9-497b427e2006/content/images/2025/12/image.png",
      "alt": "Find and download the .msi installer under the latest release.",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://storage.ghost.io/c/33/67/33678c00-2c15-4961-93e9-497b427e2006/content/images/2025/12/image-1.png",
      "bytes": 263236,
      "reused": true,
      "local_path": "attachments/891046998436/images/008.png",
      "src": "https://storage.ghost.io/c/33/67/33678c00-2c15-4961-93e9-497b427e2006/content/images/2025/12/image-1.png",
      "alt": "If you see this screen, it means your Podman Desktop is already installed.",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://storage.ghost.io/c/33/67/33678c00-2c15-4961-93e9-497b427e2006/content/images/2025/12/image-2.png",
      "bytes": 217772,
      "reused": true,
      "local_path": "attachments/891046998436/images/011.png",
      "src": "https://storage.ghost.io/c/33/67/33678c00-2c15-4961-93e9-497b427e2006/content/images/2025/12/image-2.png",
      "alt": "We use the Docker SDK to manage containers in our agent framework, so make sure Docker Compatibility is turned on.",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://storage.ghost.io/c/33/67/33678c00-2c15-4961-93e9-497b427e2006/content/images/2025/12/image-3.png",
      "bytes": 138900,
      "reused": true,
      "local_path": "attachments/891046998436/images/014.png",
      "src": "https://storage.ghost.io/c/33/67/33678c00-2c15-4961-93e9-497b427e2006/content/images/2025/12/image-3.png",
      "alt": "You should use the Linux path separator here.",
      "downloaded": true
    }
  ],
  "audio": [],
  "videos": [],
  "links": [
    {
      "href": "https://www.dataleadsfuture.com/tag/agentic-ai/",
      "label": "Agentic AI",
      "type": "a"
    },
    {
      "href": "https://www.dataleadsfuture.com/author/peng/",
      "label": "",
      "type": "a"
    },
    {
      "href": "https://www.dataleadsfuture.com/exclusive-reveal-code-sandbox-tech-behind-manus-and-claude-agent-skills/",
      "label": "Exclusive Reveal: Code Sandbox Tech Behind Manus and Claude Agent Skills Use Jupyter code executor to help your agent fi",
      "type": "a"
    },
    {
      "href": "https://www.udemy.com/course/podman-for-the-absolute-beginners-hands-on-devops/?couponCode=KEEPLEARNING",
      "label": "Podman for the Absolute Beginners - Hands-On DevOps course on Udemy",
      "type": "a"
    },
    {
      "href": "https://github.com/containers/podman/releases",
      "label": "GitHub Releases page",
      "type": "a"
    },
    {
      "href": "https://podman-desktop.io/",
      "label": "here",
      "type": "a"
    }
  ],
  "repair_version": 2,
  "repaired_at": "2026-10-14T10:47:48Z",
  "source_url": "https://www.dataleadsfuture.com/a-quick-guide-to-containerizing-agent-applications-with-podman/",
  "papers": [],
  "actual_video_files": [],
  "body_chars": 10267,
  "expected_body_images": 7,
  "discovery_status": "ok",
  "delivery_status": "ok",
  "missing_reason": "",
  "raw_html": "attachments/891046998436/pages/source.html",
  "local_html": "attachments/891046998436/pages/article.html",
  "body_base_path": "attachments/891046998436/pages/",
  "body_markdown_path": "attachments/891046998436/pages/article.md"
}