I am trying to change the "Volume Serial Number" of a docker image with Sysinternals VolumeId but I'm getting Error reading drive: The request is not supported.
when I run Volumeid64.exe C: 1AAA-111A -nobanner -accepteula
.
I've also tried with volumeid.exe
. I'm quit new to Docker so it feels like I might be make a beginner mistake, or is this a limitation of Docker and/or Volumeid
?
The complete Dockerfile
looks as follows
FROM microsoft/windowsservercore
WORKDIR C:/sysinternals
RUN powershell -Command \
Invoke-WebRequest -outfile VolumeId.zip "https://download.sysinternals.com/files/VolumeId.zip" -UseBasicParsing; ` \
Expand-Archive VolumeId.zip -DestinationPath c:\sysinternals ; ` Remove-Item VolumeId.zip ; ` \
Invoke-Expression 'c:\sysinternals\Volumeid64.exe C: 1AAA-111A -nobanner -accepteula'
CMD vol c: