locked
How to disable Windows Defender for Docker file system RRS feed

  • Question

  • I added folders to Windows Defender exclusion list:

    C:\ProgramData\Docker

    C:\Work

    I ran docker build from C:\Work\MyProject. Dockerfile contains COPY . C:/Build statement.

    Antimalware Service Executable (MsMpEng.exe) consumes a lot of CPU and disk resources. I see in Resource Monitor that MsMpEng.exe checks files inside Docker:

    \Device\HarddiskVolume26\Build\...

    How to add all Docker volumes to exclusion list of Windows Defender?


    • Edited by Anton Zimin Wednesday, May 24, 2017 10:07 AM
    Monday, May 22, 2017 9:09 AM

All replies

  • Hi There,

    First, on the host disable real time scanning and see If it helps.

    http://www.ntweekly.com/?p=14866


    If it helps, use the Defender Powershell Module to exclude the folders, to view all cmdlets use the cmdlet below.

    Get-Command -Module defender

    Tuesday, May 23, 2017 8:00 AM
  • This command helps:
    Set-MpPreference -DisableRealtimeMonitoring $true

    However, I can't add exclusion for that path

    https://www.screencast.com/t/xy19oMnY

    I think Windows Defender ignores the \Device\HarddiskVolume128 path.

    Set-MpPreference -ExclusionPath 'C:\Work', 'C:\ProgramData\Docker', '\Device\HarddiskVolume26', '\Device\HarddiskVolume128'

    C:\Work contains my project with Docker context.


    • Edited by Anton Zimin Wednesday, May 24, 2017 10:17 AM
    Wednesday, May 24, 2017 10:12 AM
  • This command helps:
    Set-MpPreference -DisableRealtimeMonitoring $true

    However, I can't add exclusion for that path

    https://www.screencast.com/t/xy19oMnY

    I think Windows Defender ignores the \Device\HarddiskVolume128 path.

    Set-MpPreference -ExclusionPath 'C:\Work', 'C:\ProgramData\Docker', '\Device\HarddiskVolume26', '\Device\HarddiskVolume128'

    C:\Work contains my project with Docker context.


    Try this link, this will help how to exclude file or folder
    Monday, August 7, 2017 1:35 PM