Can I map a local Windows drive folder to a container in AKS for persistent storage?

I tried to create dockertest folder in D drive (host machine - windows server 2019 )and you can see I am tried to map frin D:test folder in host machine to C agent data folder in side container.

so for that i executed below command

docker run -it `

-v D:\DockerTest:C:\AgentData `

Microsoft Artifact Registry `

powershell

I could see data is persistent with above step, but the things is

we use this container and we build image using dockerfile and then we move same image to AKS and deploy pods, at that time also can we maintain persistent from folder in d drive to c drive in continer? Please clarify

How did you install and run Docker?

It is window server 2019 machine and here is the output of docker version `PS C:\Windows\system32> docker --version
Docker version 28.1.0, build 4d8c241
PS C:\Windows\system32> docker version
Client:
Version: 28.1.0
API version: 1.49
Go version: go1.23.8
Git commit: 4d8c241
Built: Thu Apr 17 09:55:20 2025
OS/Arch: windows/amd64
Context: default

Server: Docker Engine - Community
Engine:
Version: 28.1.0
API version: 1.49 (minimum version 1.24)
Go version: go1.23.8
Git commit: 3f46cad
Built: Thu Apr 17 09:54:15 2025
OS/Arch: windows/amd64
Experimental: false`

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.