{"id":5928,"date":"2022-10-23T17:19:21","date_gmt":"2022-10-23T09:19:21","guid":{"rendered":"https:\/\/i007.vip:15443\/wordpress\/?p=5928"},"modified":"2022-10-23T17:19:21","modified_gmt":"2022-10-23T09:19:21","slug":"%e4%bd%bf%e7%94%a8-vs-code-%e5%9c%a8%e5%ae%b9%e5%99%a8%e4%b8%ad%e5%bc%80%e5%8f%91","status":"publish","type":"post","link":"https:\/\/i007.cc\/wordpress\/archives\/5928","title":{"rendered":"\u4f7f\u7528 VS Code \u5728\u5bb9\u5668\u4e2d\u5f00\u53d1"},"content":{"rendered":"<div class=\"h hm bm\">\n<p id=\"article_title\" class=\"ph\"><a href=\"https:\/\/linux.cn\/article-13708-1.html\">\u539f\u6587\u5730\u5740<\/a><\/p>\n<p>\u00a0<\/p>\n<\/div>\n<div class=\"d\">\n<div id=\"article_content\">\n<div id=\"article_copyright\" class=\"ph\">\u4f5c\u8005\uff1a\u00a0<span class=\"textcut\"><a class=\"ext\" href=\"https:\/\/opensource.com\/article\/21\/7\/vs-code-remote-containers-podman\" target=\"_blank\" rel=\"external nofollow noopener\">Brant Evans<\/a><\/span>\u00a0\u8bd1\u8005\uff1a\u00a0<a href=\"https:\/\/linux.cn\/lctt\/\" target=\"_blank\" rel=\"noopener\">LCTT<\/a>\u00a0<a class=\"ext\" href=\"https:\/\/linux.cn\/lctt\/wxy\" target=\"_blank\" rel=\"external nofollow noopener\">Xingyu.Wang<\/a><\/p>\n<p id=\"article_date\">| 2021-08-22 09:03\u00a0\u00a0 \u6536\u85cf:\u00a0<em id=\"_favtimes\">1<\/em><\/p>\n<\/div>\n<blockquote><p>\u4e00\u81f4\u6027\u53ef\u4ee5\u907f\u514d\u5f53\u4f60\u6709\u591a\u4e2a\u5f00\u53d1\u4eba\u5458\u5f00\u53d1\u540c\u4e00\u4e2a\u9879\u76ee\u65f6\u51fa\u73b0\u95ee\u9898\u3002<\/p><\/blockquote>\n<p>\u5f53\u4f60\u6709\u591a\u4e2a\u4e0d\u540c\u5f00\u53d1\u73af\u5883\u7684\u5f00\u53d1\u4eba\u5458\u5728\u4e00\u4e2a\u9879\u76ee\u4e0a\u5de5\u4f5c\u65f6\uff0c\u7f16\u7801\u548c\u6d4b\u8bd5\u7684\u4e0d\u4e00\u81f4\u6027\u662f\u4e00\u79cd\u98ce\u9669\u3002<a class=\"ext\" href=\"https:\/\/code.visualstudio.com\/\" target=\"_blank\" rel=\"external nofollow noopener\">Visual Studio Code<\/a>\uff08VS Code\uff09\u662f\u4e00\u4e2a\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\uff0c\u53ef\u4ee5\u5e2e\u52a9\u51cf\u5c11\u8fd9\u4e9b\u95ee\u9898\u3002\u5b83\u53ef\u4ee5\u548c\u5bb9\u5668\u7ed3\u5408\u8d77\u6765\uff0c\u4e3a\u6bcf\u4e2a\u5e94\u7528\u7a0b\u5e8f\u63d0\u4f9b\u72ec\u7acb\u7684\u5f00\u53d1\u73af\u5883\uff0c\u540c\u65f6\u63d0\u4f9b\u4e00\u4e2a\u4e00\u81f4\u7684\u5f00\u53d1\u73af\u5883\u3002<\/p>\n<p>VS Code \u7684\u00a0<a class=\"ext\" href=\"https:\/\/code.visualstudio.com\/docs\/remote\/containers\" target=\"_blank\" rel=\"external nofollow noopener\">\u201cRemote &#8211; Containers\u201d \u6269\u5c55<\/a>\u00a0\u4f7f\u4f60\u80fd\u591f\u521b\u5efa\u4e00\u4e2a\u5bb9\u5668\u5b9a\u4e49\uff0c\u4f7f\u7528\u8be5\u5b9a\u4e49\u6765\u6784\u5efa\u4e00\u4e2a\u5bb9\u5668\uff0c\u5e76\u5728\u5bb9\u5668\u5185\u8fdb\u884c\u5f00\u53d1\u3002\u8fd9\u4e2a\u5bb9\u5668\u5b9a\u4e49\u53ef\u4ee5\u548c\u5e94\u7528\u7a0b\u5e8f\u4ee3\u7801\u4e00\u8d77\u88ab\u7b7e\u5165\u5230\u6e90\u4ee3\u7801\u5e93\u4e2d\uff0c\u8fd9\u4f7f\u5f97\u6240\u6709\u7684\u5f00\u53d1\u4eba\u5458\u53ef\u4ee5\u4f7f\u7528\u76f8\u540c\u7684\u5b9a\u4e49\u5728\u5bb9\u5668\u4e2d\u8fdb\u884c\u6784\u5efa\u548c\u5f00\u53d1\u3002<\/p>\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u201cRemote &#8211; Containers\u201d \u6269\u5c55\u4f7f\u7528 Docker \u6765\u6784\u5efa\u548c\u8fd0\u884c\u5bb9\u5668\uff0c\u4f46\u4f7f\u7528\u00a0<a class=\"ext\" href=\"https:\/\/podman.io\/\" target=\"_blank\" rel=\"external nofollow noopener\">Podman<\/a>\u00a0\u7684\u5bb9\u5668\u8fd0\u884c\u73af\u5883\u73af\u5883\u4e5f\u5f88\u5bb9\u6613\uff0c\u5b83\u53ef\u4ee5\u8ba9\u4f60\u4f7f\u7528\u00a0<a class=\"ext\" href=\"https:\/\/www.redhat.com\/sysadmin\/rootless-podman-makes-sense\" target=\"_blank\" rel=\"external nofollow noopener\">\u514d root \u5bb9\u5668<\/a>\u3002<\/p>\n<p>\u672c\u6587\u5c06\u5e26\u9886\u4f60\u5b8c\u6210\u8bbe\u7f6e\uff0c\u901a\u8fc7 Podman \u5728\u514d root \u5bb9\u5668\u5185\u4f7f\u7528 VS Code \u548c \u201cRemote &#8211; Containers\u201d \u6269\u5c55\u8fdb\u884c\u5f00\u53d1\u3002<\/p>\n<h3 id=\"%E5%88%9D%E5%A7%8B%E9%85%8D%E7%BD%AE\" class=\"mume-header\">\u521d\u59cb\u914d\u7f6e<\/h3>\n<p>\u5728\u7ee7\u7eed\u4e4b\u524d\uff0c\u8bf7\u786e\u4fdd\u4f60\u7684\u7ea2\u5e3d\u4f01\u4e1a Linux\uff08RHEL\uff09\u6216 Fedora \u5de5\u4f5c\u7ad9\u5df2\u7ecf\u66f4\u65b0\u4e86\u6700\u65b0\u7684\u8865\u4e01\uff0c\u5e76\u4e14\u5b89\u88c5\u4e86 VS Code \u548c \u201cRemote &#8211; Containers\u201d \u6269\u5c55\u3002\uff08\u53c2\u89c1\u00a0<a class=\"ext\" href=\"https:\/\/code.visualstudio.com\/\" target=\"_blank\" rel=\"external nofollow noopener\">VS Code \u7f51\u7ad9<\/a>\u4e86\u89e3\u66f4\u591a\u5b89\u88c5\u4fe1\u606f\uff09<\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u7528\u4e00\u4e2a\u7b80\u5355\u7684\u00a0<code>dnf install<\/code>\u00a0\u547d\u4ee4\u6765\u5b89\u88c5 Podman \u548c\u5b83\u7684\u652f\u6301\u5305\uff1a<\/p>\n<ol class=\"linenums\">\n<li class=\"L0\"><code><span class=\"pln\">$ <\/span><span class=\"kwd\">sudo<\/span><span class=\"pln\"> dnf install <\/span><span class=\"pun\">-<\/span><span class=\"pln\">y podman<\/span><\/code><\/li>\n<\/ol>\n<p>\u5b89\u88c5\u5b8c Podman \u540e\uff0c\u914d\u7f6e VS Code \u4ee5\u4f7f\u7528 Podman \u7684\u53ef\u6267\u884c\u6587\u4ef6\uff08\u800c\u4e0d\u662f Docker\uff09\u4e0e\u5bb9\u5668\u8fdb\u884c\u4ea4\u4e92\u3002\u5728 VS Code \u4e2d\uff0c\u5bfc\u822a\u5230 \u201c\u6587\u4ef6 > \u9996\u9009\u9879 > \u8bbe\u7f6e\u201d\uff0c\u70b9\u51fb \u201c\u6269\u5c55\u201d \u65c1\u8fb9\u7684 \u201c>\u201d \u56fe\u6807\u3002\u5728\u51fa\u73b0\u7684\u4e0b\u62c9\u83dc\u5355\u4e2d\uff0c\u9009\u62e9 \u201cRemote &#8211; Containers\u201d\uff0c\u5e76\u5411\u4e0b\u6eda\u52a8\u627e\u5230 \u201cRemote &#8211; Containers: Docker Path\u201d \u9009\u9879\u3002\u5728\u6587\u672c\u6846\u4e2d\uff0c\u7528 \u201cpodman\u201d \u66ff\u6362 \u201cdocker\u201d\u3002<\/p>\n<p class=\"article_img\"><img decoding=\"async\" title=\"Enter \"podman\" in the text box\" src=\"https:\/\/img.linux.net.cn\/data\/attachment\/album\/202108\/22\/090353vvo7p5w8rp0rmuru.png\" alt=\"\u5728\u6587\u672c\u6846\u4e2d\u8f93\u5165 \u201cpodman\u201d\" \/><\/p>\n<p class=\"article_img_desc\"><em>\u5728\u6587\u672c\u6846\u4e2d\u8f93\u5165 \u201cpodman\u201d<\/em><\/p>\n<p>\u73b0\u5728\u914d\u7f6e\u5df2\u7ecf\u5b8c\u6210\uff0c\u5728 VS Code \u4e2d\u4e3a\u8be5\u9879\u76ee\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u6587\u4ef6\u5939\u6216\u6253\u5f00\u73b0\u6709\u7684\u6587\u4ef6\u5939\u3002<\/p>\n<h3 id=\"%E5%AE%9A%E4%B9%89%E5%AE%B9%E5%99%A8\" class=\"mume-header\">\u5b9a\u4e49\u5bb9\u5668<\/h3>\n<p>\u672c\u6559\u7a0b\u4ee5\u521b\u5efa Python 3 \u5f00\u53d1\u7684\u5bb9\u5668\u4e3a\u4f8b\u3002<\/p>\n<p>\u201cRemote &#8211; Containers\u201d \u6269\u5c55\u53ef\u4ee5\u5728\u9879\u76ee\u6587\u4ef6\u5939\u4e2d\u6dfb\u52a0\u5fc5\u8981\u7684\u57fa\u672c\u914d\u7f6e\u6587\u4ef6\u3002\u8981\u6dfb\u52a0\u8fd9\u4e9b\u6587\u4ef6\uff0c\u901a\u8fc7\u5728\u952e\u76d8\u4e0a\u8f93\u5165\u00a0<code>Ctrl+Shift+P<\/code>\u00a0\u6253\u5f00\u547d\u4ee4\u9762\u677f\uff0c\u641c\u7d22 \u201cRemote-Containers: Add Development Container Configuration Files\u201d\uff0c\u5e76\u9009\u62e9\u5b83\u3002<\/p>\n<p class=\"article_img\"><img decoding=\"async\" title=\"Remote-Containers: Add Development Container Configuration Files\" src=\"https:\/\/img.linux.net.cn\/data\/attachment\/album\/202108\/22\/090353p6bbnwb4swzutx9k.png\" alt=\"Remote-Containers: Add Development Container Configuration Files\" \/><\/p>\n<p class=\"article_img_desc\"><em>Remote-Containers: Add Development Container Configuration Files<\/em><\/p>\n<p>\u5728\u63a5\u4e0b\u6765\u7684\u5f39\u51fa\u7a97\u53e3\u4e2d\uff0c\u5b9a\u4e49\u4f60\u60f3\u8bbe\u7f6e\u7684\u5f00\u53d1\u73af\u5883\u7684\u7c7b\u578b\u3002\u5bf9\u4e8e\u8fd9\u4e2a\u4f8b\u5b50\u7684\u914d\u7f6e\uff0c\u641c\u7d22 \u201cPython 3\u201d \u5b9a\u4e49\u5e76\u9009\u62e9\u5b83\u3002<\/p>\n<p class=\"article_img\"><img decoding=\"async\" title=\"Select Python 3 definition\" src=\"https:\/\/img.linux.net.cn\/data\/attachment\/album\/202108\/22\/090354bzaj4k49jjnxsky1.png\" alt=\"\u9009\u62e9 Python 3 \u5b9a\u4e49\" \/><\/p>\n<p class=\"article_img_desc\"><em>\u9009\u62e9 Python 3 \u5b9a\u4e49<\/em><\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u9009\u62e9\u5c06\u5728\u5bb9\u5668\u4e2d\u4f7f\u7528\u7684 Python \u7684\u7248\u672c\u3002\u9009\u62e9 \u201c3 (default)\u201d \u9009\u9879\u4ee5\u4f7f\u7528\u6700\u65b0\u7684\u7248\u672c\u3002<\/p>\n<p class=\"article_img\"><img decoding=\"async\" title=\"Select the 3 (default) option\" src=\"https:\/\/img.linux.net.cn\/data\/attachment\/album\/202108\/22\/090354tbjpglgf68fffbf8.png\" alt=\"\u9009\u62e9 \u201c3 (default)\u201d \u9009\u9879\" \/><\/p>\n<p class=\"article_img_desc\"><em>\u9009\u62e9 \u201c3 (default)\u201d \u9009\u9879<\/em><\/p>\n<p>Python \u914d\u7f6e\u4e5f\u53ef\u4ee5\u5b89\u88c5 Node.js\uff0c\u4f46\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u53d6\u6d88\u52fe\u9009 \u201cInstall Node.js\u201d\uff0c\u7136\u540e\u70b9\u51fb \u201cOK\u201d\u3002<\/p>\n<p class=\"article_img\"><img decoding=\"async\" title=\"Uncheck \"Install Node.js\"\" src=\"https:\/\/img.linux.net.cn\/data\/attachment\/album\/202108\/22\/090354kf3nfbpo9fnnp7nc.png\" alt=\"\u53d6\u6d88\u52fe\u9009 \u201cInstall Node.js\"\" \/><\/p>\n<p class=\"article_img_desc\"><em>\u53d6\u6d88\u52fe\u9009 \u201cInstall Node.js&#8221;<\/em><\/p>\n<p>\u5b83\u5c06\u521b\u5efa\u4e00\u4e2a\u00a0<code>.devcontainer<\/code>\u00a0\u6587\u4ef6\u5939\uff0c\u5305\u542b\u6587\u4ef6<code>devcontainer.json<\/code>\u548c<code>Dockerfile<\/code>\u3002VS Code \u4f1a\u81ea\u52a8\u6253\u5f00<code>devcontainer.json<\/code>\u00a0\u6587\u4ef6\uff0c\u8fd9\u6837\u4f60\u5c31\u53ef\u4ee5\u5bf9\u5b83\u8fdb\u884c\u81ea\u5b9a\u4e49\u3002<\/p>\n<h3 id=\"%E5%90%AF%E7%94%A8%E5%85%8D-root-%E5%AE%B9%E5%99%A8\" class=\"mume-header\">\u542f\u7528\u514d root \u5bb9\u5668<\/h3>\n<p>\u9664\u4e86\u660e\u663e\u7684\u5b89\u5168\u4f18\u52bf\u5916\uff0c\u4ee5\u514d root \u65b9\u5f0f\u8fd0\u884c\u5bb9\u5668\u7684\u53e6\u4e00\u4e2a\u539f\u56e0\u662f\uff0c\u5728\u9879\u76ee\u6587\u4ef6\u5939\u4e2d\u521b\u5efa\u7684\u6240\u6709\u6587\u4ef6\u5c06\u7531\u5bb9\u5668\u5916\u7684\u6b63\u786e\u7528\u6237 ID\uff08UID\uff09\u62e5\u6709\u3002\u8981\u5c06\u5f00\u53d1\u5bb9\u5668\u4f5c\u4e3a\u514d root \u5bb9\u5668\u8fd0\u884c\uff0c\u8bf7\u4fee\u6539\u00a0<code>devcontainer.json<\/code>\u00a0\u6587\u4ef6\uff0c\u5728\u5b83\u7684\u672b\u5c3e\u6dfb\u52a0\u4ee5\u4e0b\u51e0\u884c\uff1a<\/p>\n<ol class=\"linenums\">\n<li class=\"L0\"><code><span class=\"str\">\"workspaceMount\"<\/span><span class=\"pun\">:<\/span> <span class=\"str\">\"source=${localWorkspaceFolder},target=\/workspace,type=bind,Z\"<\/span><span class=\"pun\">,<\/span><\/code><\/li>\n<li class=\"L1\"><code><span class=\"str\">\"workspaceFolder\"<\/span><span class=\"pun\">:<\/span> <span class=\"str\">\"\/workspace\"<\/span><span class=\"pun\">,<\/span><\/code><\/li>\n<li class=\"L2\"><code><\/code><\/li>\n<li class=\"L3\"><code><span class=\"str\">\"runArgs\"<\/span><span class=\"pun\">:<\/span> <span class=\"pun\">[<\/span><span class=\"str\">\"--userns=keep-id\"<\/span><span class=\"pun\">],<\/span><\/code><\/li>\n<li class=\"L4\"><code><span class=\"str\">\"containerUser\"<\/span><span class=\"pun\">:<\/span> <span class=\"str\">\"vscode\"<\/span><\/code><\/li>\n<\/ol>\n<p>\u8fd9\u4e9b\u9009\u9879\u544a\u8bc9 VS Code \u7528\u9002\u5f53\u7684 SELinux \u4e0a\u4e0b\u6587\u6302\u8f7d\u5de5\u4f5c\u533a\uff0c\u521b\u5efa\u4e00\u4e2a\u7528\u6237\u547d\u540d\u7a7a\u95f4\uff0c\u5c06\u4f60\u7684 UID \u548c GID \u539f\u6837\u6620\u5c04\u5230\u5bb9\u5668\u5185\uff0c\u5e76\u5728\u5bb9\u5668\u5185\u4f7f\u7528\u00a0<code>vscode<\/code>\u00a0\u4f5c\u4e3a\u4f60\u7684\u7528\u6237\u540d\u3002<code>devcontainer.json<\/code>\u00a0\u6587\u4ef6\u5e94\u8be5\u662f\u8fd9\u6837\u7684\uff08\u522b\u5fd8\u4e86\u884c\u672b\u7684\u9017\u53f7\uff0c\u5982\u56fe\u6240\u793a\uff09\uff1a<\/p>\n<p class=\"article_img\"><img decoding=\"async\" title=\"Updated devcontainer.json file\" src=\"https:\/\/img.linux.net.cn\/data\/attachment\/album\/202108\/22\/090355oy456mfx06kik6zi.png\" alt=\"\u66f4\u65b0\u540e\u7684 devcontainer.json \u6587\u4ef6\" \/><\/p>\n<p class=\"article_img_desc\"><em>\u66f4\u65b0\u540e\u7684 devcontainer.json \u6587\u4ef6<\/em><\/p>\n<p>\u73b0\u5728\u4f60\u5df2\u7ecf\u8bbe\u7f6e\u597d\u4e86\u5bb9\u5668\u7684\u914d\u7f6e\uff0c\u4f60\u53ef\u4ee5\u6784\u5efa\u5bb9\u5668\u5e76\u6253\u5f00\u91cc\u9762\u7684\u5de5\u4f5c\u7a7a\u95f4\u3002\u91cd\u65b0\u6253\u5f00\u547d\u4ee4\u8c03\u677f\uff08\u7528\u00a0<code>Ctrl+Shift+P<\/code>\uff09\uff0c\u5e76\u641c\u7d22 \u201cRemote-Containers: Rebuild and Reopen in Container\u201d\u3002\u70b9\u51fb\u5b83\uff0cVS Code \u5c06\u5f00\u59cb\u6784\u5efa\u5bb9\u5668\u3002\u73b0\u5728\u662f\u4f11\u606f\u4e00\u4e0b\u7684\u597d\u65f6\u673a\uff08\u62ff\u4e0a\u4f60\u6700\u559c\u6b22\u7684\u996e\u6599\uff09\uff0c\u56e0\u4e3a\u6784\u5efa\u5bb9\u5668\u53ef\u80fd\u9700\u8981\u51e0\u5206\u949f\u65f6\u95f4\uff1a<\/p>\n<p class=\"article_img\"><img decoding=\"async\" title=\"Building the container\" src=\"https:\/\/img.linux.net.cn\/data\/attachment\/album\/202108\/22\/090355lt2p1t8jbet14sje.png\" alt=\"\u6784\u5efa\u5bb9\u5668\" \/><\/p>\n<p class=\"article_img_desc\"><em>\u6784\u5efa\u5bb9\u5668<\/em><\/p>\n<p>\u4e00\u65e6\u5bb9\u5668\u6784\u5efa\u5b8c\u6210\uff0c\u9879\u76ee\u5c06\u5728\u5bb9\u5668\u5185\u6253\u5f00\u3002\u5728\u5bb9\u5668\u5185\u521b\u5efa\u6216\u7f16\u8f91\u7684\u6587\u4ef6\u5c06\u53cd\u6620\u5728\u5bb9\u5668\u5916\u7684\u6587\u4ef6\u7cfb\u7edf\u4e2d\uff0c\u5e76\u5bf9\u8fd9\u4e9b\u6587\u4ef6\u5e94\u7528\u9002\u5f53\u7684\u7528\u6237\u6743\u9650\u3002\u73b0\u5728\uff0c\u4f60\u53ef\u4ee5\u5728\u5bb9\u5668\u5185\u8fdb\u884c\u5f00\u53d1\u4e86\u3002VS Code \u751a\u81f3\u53ef\u4ee5\u628a\u4f60\u7684 SSH \u5bc6\u94a5\u548c Git \u914d\u7f6e\u5e26\u5165\u5bb9\u5668\u4e2d\uff0c\u8fd9\u6837\u63d0\u4ea4\u4ee3\u7801\u5c31\u4f1a\u50cf\u5728\u5bb9\u5668\u5916\u7f16\u8f91\u65f6\u90a3\u6837\u5de5\u4f5c\u3002<\/p>\n<h3 id=\"%E6%8E%A5%E4%B8%8B%E6%9D%A5%E7%9A%84%E6%AD%A5%E9%AA%A4\" class=\"mume-header\">\u63a5\u4e0b\u6765\u7684\u6b65\u9aa4<\/h3>\n<p>\u73b0\u5728\u4f60\u5df2\u7ecf\u5b8c\u6210\u4e86\u57fa\u672c\u7684\u8bbe\u7f6e\u548c\u914d\u7f6e\uff0c\u4f60\u53ef\u4ee5\u8fdb\u4e00\u6b65\u52a0\u5f3a\u914d\u7f6e\u7684\u5b9e\u7528\u6027\u3002\u6bd4\u5982\u8bf4\uff1a<\/p>\n<ul>\n<li>\u4fee\u6539 Dockerfile \u4ee5\u5b89\u88c5\u989d\u5916\u7684\u8f6f\u4ef6\uff08\u4f8b\u5982\uff0c\u6240\u9700\u7684 Python \u6a21\u5757\uff09\u3002<\/li>\n<li>\u4f7f\u7528\u4e00\u4e2a\u5b9a\u5236\u7684\u5bb9\u5668\u955c\u50cf\u3002\u4f8b\u5982\uff0c\u5982\u679c\u4f60\u6b63\u5728\u8fdb\u884c Ansible \u5f00\u53d1\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u00a0<a class=\"ext\" href=\"http:\/\/quay.io\/\" target=\"_blank\" rel=\"external nofollow noopener\">Quay.io<\/a>\u00a0\u7684\u00a0<a class=\"ext\" href=\"https:\/\/quay.io\/repository\/ansible\/toolset\" target=\"_blank\" rel=\"external nofollow noopener\">Ansible Toolset<\/a>\u3002\uff08\u786e\u4fdd\u901a\u8fc7 Dockerfile \u5c06\u00a0<code>vscode<\/code>\u00a0\u7528\u6237\u6dfb\u52a0\u5230\u5bb9\u5668\u955c\u50cf\u4e2d\uff09<\/li>\n<li>\u5c06\u00a0<code>.devcontainer<\/code>\u00a0\u76ee\u5f55\u4e0b\u7684\u6587\u4ef6\u63d0\u4ea4\u5230\u6e90\u4ee3\u7801\u5e93\uff0c\u4ee5\u4fbf\u5176\u4ed6\u5f00\u53d1\u8005\u53ef\u4ee5\u5229\u7528\u5bb9\u5668\u7684\u5b9a\u4e49\u8fdb\u884c\u5f00\u53d1\u5de5\u4f5c\u3002<\/li>\n<\/ul>\n<p>\u5728\u5bb9\u5668\u5185\u5f00\u53d1\u6709\u52a9\u4e8e\u9632\u6b62\u4e0d\u540c\u9879\u76ee\u4e4b\u95f4\u7684\u51b2\u7a81\uff0c\u56e0\u4e3a\u9694\u79bb\u4e86\u4e0d\u540c\u9879\u76ee\u7684\u4f9d\u8d56\u5173\u7cfb\u53ca\u4ee3\u7801\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528 Podman \u5728\u514d root \u73af\u5883\u4e0b\u8fd0\u884c\u5bb9\u5668\uff0c\u4ece\u800c\u63d0\u9ad8\u5b89\u5168\u6027\u3002\u901a\u8fc7\u7ed3\u5408 VS Code\u3001\u201cRemote &#8211; Containers\u201d \u6269\u5c55\u548c Podman\uff0c\u4f60\u53ef\u4ee5\u8f7b\u677e\u5730\u4e3a\u591a\u4e2a\u5f00\u53d1\u4eba\u5458\u5efa\u7acb\u4e00\u4e2a\u4e00\u81f4\u7684\u73af\u5883\uff0c\u51cf\u5c11\u8bbe\u7f6e\u65f6\u95f4\uff0c\u5e76\u4ee5\u5b89\u5168\u7684\u65b9\u5f0f\u51cf\u5c11\u5f00\u53d1\u73af\u5883\u7684\u5dee\u5f02\u5e26\u6765\u7684\u9519\u8bef\u3002<\/p>\n<hr \/>\n<p>via:\u00a0<a class=\"ext\" href=\"https:\/\/opensource.com\/article\/21\/7\/vs-code-remote-containers-podman\" target=\"_blank\" rel=\"external nofollow noopener\">https:\/\/opensource.com\/article\/21\/7\/vs-code-remote-containers-podman<\/a><\/p>\n<p>\u4f5c\u8005\uff1a<a class=\"ext\" href=\"https:\/\/opensource.com\/users\/branic\" target=\"_blank\" rel=\"external nofollow noopener\">Brant Evans<\/a>\u00a0\u9009\u9898\uff1a<a class=\"ext\" href=\"https:\/\/github.com\/lujun9972\" target=\"_blank\" rel=\"external nofollow noopener\">lujun9972<\/a>\u00a0\u8bd1\u8005\uff1a<a class=\"ext\" href=\"https:\/\/github.com\/wxy\" target=\"_blank\" rel=\"external nofollow noopener\">wxy<\/a>\u00a0\u6821\u5bf9\uff1a<a class=\"ext\" href=\"https:\/\/github.com\/wxy\" target=\"_blank\" rel=\"external nofollow noopener\">wxy<\/a><\/p>\n<p>\u672c\u6587\u7531\u00a0<a class=\"ext\" href=\"https:\/\/github.com\/LCTT\/TranslateProject\" target=\"_blank\" rel=\"external nofollow noopener\">LCTT<\/a>\u00a0\u539f\u521b\u7f16\u8bd1\uff0c<a href=\"https:\/\/linux.cn\/article-13708-1.html\">Linux\u4e2d\u56fd<\/a>\u00a0\u8363\u8a89\u63a8\u51fa<\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u539f\u6587\u5730\u5740 \u00a0 \u4f5c\u8005\uff1a\u00a0Brant Eva<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[24],"tags":[121],"class_list":["post-5928","post","type-post","status-publish","format-standard","hentry","category-value_docs","tag-05-"],"_links":{"self":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts\/5928","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/comments?post=5928"}],"version-history":[{"count":0,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts\/5928\/revisions"}],"wp:attachment":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/media?parent=5928"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/categories?post=5928"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/tags?post=5928"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}