Skip to content
This repository has been archived by the owner on Feb 4, 2019. It is now read-only.

Troubles with drives in Docker #425

Open
ForNeVeR opened this issue Jul 24, 2016 · 0 comments · May be fixed by #427
Open

Troubles with drives in Docker #425

ForNeVeR opened this issue Jul 24, 2016 · 0 comments · May be fixed by #427

Comments

@ForNeVeR
Copy link
Contributor

ForNeVeR commented Jul 24, 2016

A user reported a problem in our mailing list. He wasn't able to run Pash at all because of the following error:

Unhandled Exception:
System.Management.Automation.MethodInvocationException: No such provider. A provider with the name "FileSystem" doesn't exist.
  at System.Management.Automation.DriveManagementIntrinsics.GetAllForProvider (System.String providerName) <0x41839d00 + 0x0029b> in <filename unknown>:0
  at System.Management.Automation.ProviderInfo.get_Drives () <0x41839cc0 + 0x0002b> in <filename unknown>:0
  at Pash.Implementation.SessionStateGlobal.SetCurrentDrive () <0x41839520 + 0x0006f> in <filename unknown>:0
  at Pash.Implementation.LocalRunspace.InitializeDefaultSnapins () <0x41812070 + 0x0005b> in <filename unknown>:0
  at Pash.Implementation.LocalRunspace.Open () <0x41811e20 + 0x00113> in <filename unknown>:0
  at Pash.FullHost..ctor (Boolean interactive) <0x417e7770 + 0x000e1> in <filename unknown>:0
  at Pash.Program.Main (System.String[] args) <0x417e6df0 + 0x00107> in <filename unknown>:0

Here's the Dockerfile:

FROM mono:latest
RUN apt-get update && \
 apt-get install -y git
RUN mkdir /root/pash
WORKDIR /root/pash
RUN git clone https://github.com/Pash-Project/Pash.git . && \
 xbuild
CMD ["mono", "Source/PashConsole/bin/Debug/Pash.exe"]

I was able to reproduce the issue. Further investigation lead me to the conclusion that System.IO.DriveInfo.GetDrives() returns an empty array in Docker for some reason. It seems that this problem was reported and ultimately fixed by Xamarin, but it seems like the fixed version weren't released yet.

What can we do? Create a virtual virtual drive if we haven't found any real virtual drives? Recommend guys to run Docker in some special mode so it will turn off its aufs and overlay thingies (if that's possible at all)? Just give up and mark that as "known issue"?

UPD: I've misread the source. It should create that "virtual virtual drive" if running on Linux. So, again, I don't know what's happening. Reference Pash sources: FileSystemProvider.InitializeDefaultDrives and DriveManagementIntrinsics.GetAll.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant