CARVIEW |
Select Language
HTTP/2 200
date: Wed, 23 Jul 2025 08:05:32 GMT
content-type: text/html; charset=utf-8
cache-control: max-age=0, private, must-revalidate
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
link: ; rel=preload; as=fetch; crossorigin=use-credentials
referrer-policy: no-referrer-when-downgrade
server-timing: issue_layout-fragment;desc="issue_layout fragment";dur=281.925202,issue_conversation_content-fragment;desc="issue_conversation_content fragment";dur=670.359887,issue_conversation_sidebar-fragment;desc="issue_conversation_sidebar fragment";dur=62.886911,nginx;desc="NGINX";dur=0.771982,glb;desc="GLB";dur=105.983035
strict-transport-security: max-age=31536000; includeSubdomains; preload
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With, Accept,Accept-Encoding, Accept, X-Requested-With
x-content-type-options: nosniff
x-frame-options: deny
x-voltron-version: fd8fbbc
x-xss-protection: 0
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=YX1zU2JV7B0G5yeX0iU1VoE02wlesVPINC3JjzBki5JifVkSUdx%2BnrVRVillgt2%2FJ4P6JoC033i8NOVDjMt3vHKvlPzeWtd28AKJAN%2B9VVEsIphmdyy1xL1KdO3Ey4PoKBV9A7L8WlySPk9BBiG08xpny6l%2FfOt5HstJOM0TxynW8AvfkdJ3d6hBT8s6jGQ15%2BQBdxkKT9ljcpNLK1oVbX1O3I3skM85KvaC8%2BANETzSbMc0HF5cP2V6q6TERuzwQN%2F4%2BkpLw6sD6HnEi0ytmA%3D%3D--hjXkzms4Z%2BJTz6Rc--M04P5L4wLMjOJ6p8NBXekQ%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.192222504.1753257931; Path=/; Domain=github.com; Expires=Thu, 23 Jul 2026 08:05:31 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Thu, 23 Jul 2026 08:05:31 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: 9912:33F9F4:6BE841:86BD57:688097CB
cri: Image volumes do not work on Windows · Issue #5671 · containerd/containerd · GitHub
No typeNo projectsNo milestoneNone yetNo branches or pull requests
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Labels
Description
Description
Creating a container with an image that has a VOLUME
defined in its Dockerfile cannot be created on a Windows node through crictl.exe
, but it works without a problem with ctr.exe
. This problem does not occur on Linux.
Steps to reproduce the issue:
On Windows:
# doesn't work with crictl.
crictl --runtime-endpoint=npipe://./pipe//run/containerd-test/containerd pull docker.io/claudiubelu/volume-copy-up:2.1
$POD_ID=(crictl --runtime-endpoint=npipe://./pipe//run/containerd-test/containerd runp .\pod.json)
$CONTAINER_ID=(crictl --runtime-endpoint=npipe://./pipe//run/containerd-test/containerd create $POD_ID .\container-vol.json .\pod.json)
# works with ctr.
ctr.exe --address //./pipe//run/containerd-test/containerd run --rm docker.io/claudiubelu/volume-copy-up:2.1 test-vol-container cmd /S /C "type C:\\test_dir\\test_file"
On Linux:
./crictl --runtime-endpoint=unix://./run/containerd-test/containerd.sock pull docker.io/claudiubelu/volume-copy-up:2.1
POD_ID=$(./crictl --runtime-endpoint=unix://./run/containerd-test/containerd.sock runp ./pod.json)
CONTAINER_ID=$(./crictl --runtime-endpoint=unix://./run/containerd-test/containerd.sock create $POD_ID ./container-vol-linux.json ./pod.json)
./crictl --runtime-endpoint=unix://./run/containerd-test/containerd.sock start $CONTAINER_ID
ctr --address //./run/containerd-test/containerd.sock image pull docker.io/claudiubelu/volume-copy-up:2.1
ctr --address //./run/containerd-test/containerd.sock run --rm docker.io/claudiubelu/volume-copy-up:2.1 test-vol-container sh -c "cat /test_dir/test_file"
Image Dockerfile:
ARG BASE
FROM --platform=linux/amd64 busybox as prep
RUN sh -c "mkdir /test_dir; echo test_content > /test_dir/test_file"
FROM $BASE
COPY --from=prep /test_dir /test_dir
VOLUME "/test_dir"
pod.json:
{
"metadata": {
"name": "ready-sandbox",
"namespace": "default",
"attempt": 0,
"uid": "52fdfc072182654f163f5f0f9a621d729566c74d10037c4d7bbb0407d1e2c649"
},
"logDirectory": "/tmp"
}
container-vol.json:
{
"metadata": {
"name": "test-vol-container"
},
"image": {
"image": "claudiubelu/volume-copy-up:2.1"
},
"command": ["cmd"],
"args": ["/S", "/C", "\"type C:\\test_dir\\test_file\""]
}
container-vol-linux.json:
{
"metadata": {
"name": "test-vol-container"
},
"image": {
"image": "claudiubelu/volume-copy-up:2.1"
},
"command": ["sh"],
"args": ["-c", "\"cat /test_dir/test_file\""]
}
Describe the results you received:
Windows output:
PS C:\tmp> # doesn't work with crictl.
PS C:\tmp> crictl --runtime-endpoint=npipe://./pipe//run/containerd-test/containerd pull docker.io/claudiubelu/volu
me-copy-up:2.1
Image is up to date for sha256:e910407e38d586f81a19f0661012b786698ede5b46f66341e33da10197b76abc
PS C:\tmp> $POD_ID=(crictl --runtime-endpoint=npipe://./pipe//run/containerd-test/containerd runp .\pod.json)
PS C:\tmp> $CONTAINER_ID=(crictl --runtime-endpoint=npipe://./pipe//run/containerd-test/containerd create $POD_ID .
\container-vol.json .\pod.json)
time="2021-06-29T13:17:18Z" level=fatal msg="creating container: rpc error: code = Unknown desc = failed to generate container \"0147cb3924012562710441f3a9b2caddddf72b5056f0d73de8b9ebcc133fdf9e\" spec: failed to generate spec: failed to stat \"C:\\\\Program Files\\\\Git\\\\var\\\\lib\\\\containerd-test\\\\io.containerd.grpc.v1.cri\\\\containers\\\\0147cb3924012562710441f3a9b2caddddf72b5056f0d73de8b9ebcc133fdf9e\\\\volumes\\\\e9ef85a305f4906b2932e9ca7848a728047de9e8981ec1739f8bed5fd619460d\": CreateFile C:\\Program Files\\Git\\var\\lib\\containerd-test\\io.containerd.grpc.v1.cri\\containers\\0147cb3924012562710441f3a9b2caddddf72b5056f0d73de8b9ebcc133fdf9e\\volumes\\e9ef85a305f4906b2932e9ca7848a728047de9e8981ec1739f8bed5fd619460d: The system cannot find the path specified."
PS C:\tmp>
PS C:\tmp> # works with ctr.
PS C:\tmp> ctr.exe --address //./pipe//run/containerd-test/containerd run --rm docker.io/claudiubelu/volume-copy-up
:2.1 test-vol-container cmd /S /C "type C:\\test_dir\\test_file"
test_content
Describe the results you expected:
Linux Output:
+ ./crictl --runtime-endpoint=unix://./run/containerd-test/containerd.sock pull docker.io/claudiubelu/volume-copy-up:2.1
Image is up to date for sha256:13019b279c229f09242b2db1378ff7aa499183bc7ab1332d4b04e36896656eab
++ ./crictl --runtime-endpoint=unix://./run/containerd-test/containerd.sock runp ./pod.json
+ POD_ID=a860dfa592c4cf890b1980d2f41403ce5a9c2eb0ce1a512c69cc1852bcfe5372
++ ./crictl --runtime-endpoint=unix://./run/containerd-test/containerd.sock create a860dfa592c4cf890b1980d2f41403ce5a9c2eb0ce1a512c69cc1852bcfe5372 ./container-vol-linux.json ./pod.json
+ CONTAINER_ID=afd069d513d96e271b51cbc948b534ffb77c43f206780ba9ef25e7a946562428
+ ./crictl --runtime-endpoint=unix://./run/containerd-test/containerd.sock start afd069d513d96e271b51cbc948b534ffb77c43f206780ba9ef25e7a946562428
afd069d513d96e271b51cbc948b534ffb77c43f206780ba9ef25e7a946562428
+ ctr --address //./run/containerd-test/containerd.sock image pull docker.io/claudiubelu/volume-copy-up:2.1
docker.io/claudiubelu/volume-copy-up:2.1: resolved |++++++++++++++++++++++++++++++++++++++|
index-sha256:230b77940bebc9de34f00df5698e65a43478eed6a6dc33ee82e711e1c7691b48: exists |++++++++++++++++++++++++++++++++++++++|
manifest-sha256:28b77b5a4f26734d22f7d4f7082addabaff8d4d366b705e67d43a04dafe55d96: exists |++++++++++++++++++++++++++++++++++++++|
layer-sha256:df0e4ccb814be1f845a2d8e385e61545c20ae0aa73cc2438c50cf24adcb3abbc: exists |++++++++++++++++++++++++++++++++++++++|
config-sha256:13019b279c229f09242b2db1378ff7aa499183bc7ab1332d4b04e36896656eab: exists |++++++++++++++++++++++++++++++++++++++|
layer-sha256:b71f96345d44b237decc0c2d6c2f9ad0d17fde83dad7579608f1f0764d9686f2: exists |++++++++++++++++++++++++++++++++++++++|
elapsed: 1.7 s total: 0.0 B (0.0 B/s)
unpacking linux/amd64 sha256:230b77940bebc9de34f00df5698e65a43478eed6a6dc33ee82e711e1c7691b48...
done
+ ctr --address //./run/containerd-test/containerd.sock run --rm docker.io/claudiubelu/volume-copy-up:2.1 test-vol-container sh -c 'cat /test_dir/test_file'
test_content
What version of containerd are you using:
$ containerd --version
containerd github.com/containerd/containerd v1.5.0-153-g0a3a77bc4 0a3a77bc445379851a5c737955411fc9e630c3ce
Any other relevant information (runC version, CRI configuration, OS/Kernel version, etc.):
runc --version
$ runc --version
crictl info
$ crictl info{ "status": { "conditions": [ { "type": "RuntimeReady", "status": true, "reason": "", "message": "" }, { "type": "NetworkReady", "status": true, "reason": "", "message": "" } ] }, "cniconfig": { "PluginDirs": [ "c:/k/azurecni/bin" ], "PluginConfDir": "c:/k/azurecni/netconf", "PluginMaxConfNum": 1, "Prefix": "eth", "Networks": [ { "Config": { "Name": "azure", "CNIVersion": "0.3.0", "Plugins": [ { "Network": { "type": "azure-vnet", "capabilities": { "dns": true, "portMappings": true }, "ipam": { "type": "azure-vnet-ipam" }, "dns": { "nameservers": [ "10.0.0.10", "168.63.129.16" ], "search": [ "svc.cluster.local" ] } }, "Source": "{\"AdditionalArgs\":[{\"Name\":\"EndpointPolicy\",\"Value\":{\"ExceptionList\":[\"10.0.0.0 /8\",\"10.240.0.0/12\"],\"Type\":\"OutBoundNAT\"}},{\"Name\":\"EndpointPolicy\",\"Value\":{\"DestinationPrefix\":\" 10.0.0.0/16\",\"NeedEncap\":true,\"Type\":\"ROUTE\"}},{\"Name\":\"EndpointPolicy\",\"Value\":{\"Action\":\"Block\", \"Direction\":\"Out\",\"Priority\":200,\"Protocols\":\"6\",\"RemoteAddresses\":\"168.63.129.16/32\",\"RemotePorts\" :\"80\",\"RuleType\":\"Switch\",\"Type\":\"ACL\"}},{\"Name\":\"EndpointPolicy\",\"Value\":{\"Action\":\"Allow\",\"D irection\":\"In\",\"Priority\":65500,\"Type\":\"ACL\"}},{\"Name\":\"EndpointPolicy\",\"Value\":{\"Action\":\"Allow\ ",\"Direction\":\"Out\",\"Priority\":65500,\"Type\":\"ACL\"}}],\"bridge\":\"azure0\",\"capabilities\":{\"dns\":true ,\"portMappings\":true},\"dns\":{\"Nameservers\":[\"10.0.0.10\",\"168.63.129.16\"],\"Search\":[\"svc.cluster.local\ "]},\"ipam\":{\"type\":\"azure-vnet-ipam\"},\"mode\":\"bridge\",\"type\":\"azure-vnet\"}" } ], "Source": "{\r\n \"cniVersion\": \"0.3.0\",\r\n \"name\": \"azure\",\r\n \"adapterName\": \"\ ",\r\n \"plugins\": [\r\n {\r\n \"type\": \"azure-vnet\",\r\n \"mode\": \"bridge\",\r\n \"bridge\": \"azure0\",\r\n \"capabilities\": {\r\n \"portMappings\": true,\r\n \"dns\": true\r\n },\r\n \"ipam\": {\r\n \"type\": \"azure-vnet-ipam\"\r\n },\r\n \"dns\": {\r\n \"Nameservers\": [\r\n \"10.0.0.10\",\r\n \"168.63.129.16\"\r\n ],\r\n \"Search\": [\r\n \"svc.cluster.local\"\r\n ]\r\n },\r\n \"Additi onalArgs\": [\r\n {\r\n \"Name\": \"EndpointPolicy\",\r\n \"Value\": {\r\n \"Type\": \"OutBoundNAT\",\r\n \"ExceptionList\": [\r\n \"10.0.0.0/8\",\r\n \"10.240.0.0/12\"\r\n ]\r\n }\r\n },\r\n {\r\n \"Name\": \"EndpointPolicy\",\r\n \"Value\": {\r\n \"Type\": \"ROUTE\",\r\n \"DestinationPrefix\": \"10.0.0.0/16\",\r\n \"NeedEncap\": true\r\n }\r\n },\r\n {\r\n \"Name\": \"EndpointPolicy\",\r\n \"Value\": {\r\n \"Type\": \" ACL\",\r\n \"Protocols\": \"6\",\r\n \"Action\": \"Block\",\r\n \"Direction\": \"Out\",\r\n \"RemoteAddresses\": \"168.63.129.16/32\",\r\n \"RemotePorts\": \"80\",\r\n \"Priority\": 200 ,\r\n \"RuleType\": \"Switch\"\r\n }\r\n },\r\n {\r\n \"Name\": \"EndpointPol icy\",\r\n \"Value\": {\r\n \"Type\": \"ACL\",\r\n \"Action\": \"Allow\",\r\n \"Direction\": \"In\" ,\r\n \"Priority\": 65500\r\n }\r\n },\r\n {\r\n \"Name\": \"EndpointPolicy\" ,\r\n \"Value\": {\r\n \"Type\": \"ACL\",\r\n \"Ac tion\": \"Allow\",\r\n \"Direction\": \"Out\",\r\ n \"Priority\": 65500\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n}\r\n" }, "IFName": "eth0" } ] }, "config": { "containerd": { "snapshotter": "windows", "defaultRuntimeName": "default", "defaultRuntime": { "runtimeType": "io.containerd.runhcs.v1", "runtimeEngine": "", "PodAnnotations": null, "ContainerAnnotations": null, "runtimeRoot": "", "options": { "Debug": true, "DebugType": 2, "SandboxImage": "mcr.microsoft.com/oss/kubernetes/pause:3.4.1-windows-1809-amd64", "SandboxIsolation": 0, "SandboxPlatform": "windows/amd64" }, "privileged_without_host_devices": false, "baseRuntimeSpec": "" }, "untrustedWorkloadRuntime": { "runtimeType": "", "runtimeEngine": "", "PodAnnotations": null, "ContainerAnnotations": null, "runtimeRoot": "", "options": null, "privileged_without_host_devices": false, "baseRuntimeSpec": "" }, "runtimes": { "default": { "runtimeType": "io.containerd.runhcs.v1", "runtimeEngine": "", "PodAnnotations": null, "ContainerAnnotations": null, "runtimeRoot": "", "options": { "Debug": true, "DebugType": 2, "SandboxImage": "mcr.microsoft.com/oss/kubernetes/pause:3.4.1-windows-1809-amd64", "SandboxIsolation": 0, "SandboxPlatform": "windows/amd64" }, "privileged_without_host_devices": false, "baseRuntimeSpec": "" }, "runhcs-wcow-process": { "runtimeType": "io.containerd.runhcs.v1", "runtimeEngine": "", "PodAnnotations": null, "ContainerAnnotations": null, "runtimeRoot": "", "options": { "Debug": true, "DebugType": 2, "SandboxImage": "mcr.microsoft.com/oss/kubernetes/pause:3.4.1-windows-1809-amd64", "SandboxPlatform": "windows/amd64" }, "privileged_without_host_devices": false, "baseRuntimeSpec": "" } }, "noPivot": false, "disableSnapshotAnnotations": false, "discardUnpackedLayers": true }, "cni": { "binDir": "c:/k/azurecni/bin", "confDir": "c:/k/azurecni/netconf", "maxConfNum": 1, "confTemplate": "" }, "registry": { "configPath": "", "mirrors": { "docker.io": { "endpoint": [ "https://registry-1.docker.io" ] } }, "configs": null, "auths": null, "headers": null }, "imageDecryption": { "keyModel": "node" }, "disableTCPService": true, "streamServerAddress": "127.0.0.1", "streamServerPort": "0", "streamIdleTimeout": "4h0m0s", "enableSelinux": false, "selinuxCategoryRange": 0, "sandboxImage": "mcr.microsoft.com/oss/kubernetes/pause:3.4.1-windows-1809-amd64", "statsCollectPeriod": 10, "systemdCgroup": false, "enableTLSStreaming": false, "x509KeyPairStreaming": { "tlsCertFile": "", "tlsKeyFile": "" }, "maxContainerLogSize": 16384, "disableCgroup": false, "disableApparmor": false, "restrictOOMScoreAdj": false, "maxConcurrentDownloads": 3, "disableProcMount": false, "unsetSeccompProfile": "", "tolerateMissingHugetlbController": false, "disableHugetlbController": false, "ignoreImageDefinedVolumes": false, "netnsMountsUnderStateDir": false, "containerdRootDir": "C:\\Program Files\\Git\\var\\lib\\containerd-test", "containerdEndpoint": "//./pipe//run/containerd-test/containerd", "rootDir": "C:\\Program Files\\Git\\var\\lib\\containerd-test\\io.containerd.grpc.v1.cri", "stateDir": "C:\\Program Files\\Git\\run\\containerd-test\\io.containerd.grpc.v1.cri" }, "golang": "go1.16.4", "lastCNILoadStatus": "OK" }
uname -a
$ uname -a
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
Issue actions
You can’t perform that action at this time.