devj_1234 Posted January 30 Share Posted January 30 I have task to run container (on my azure vm - linux) from nahidupa/crash:latest image and before fix all the problems. So when i try to run container i have error ~$ docker run -it nahidupa/crash:latest Unhandled exception. System.IO.FileNotFoundException: Could not find file '/c:\notes.txt'. File name: '/c:\notes.txt' at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode) at System.IO.FileStream.OpenHandle(FileMode mode, FileShare share, FileOptions options) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize) at System.IO.StreamReader..ctor(String path, Encoding encoding) at System.IO.File.ReadLines(String path) at crash.Program.Main(String[] args) in /Users/nahidul/RiderProjects/crash/crash/Program.cs:line 9 I tried to connect to container interactively and have this files root@8075cccbb894:/# ls Dockerfile bin crash.csproj etc lib media notes.txt opt root sbin sys usr Program.cs boot dev home lib64 mnt obj proc run srv tmp var nano Program.cs using System; namespace crash { class Program { static void Main(string[] args) { System.IO.File.ReadLines("c:\\notes.txt"); } } } made changes in this file but dont know what to do next. I dont have a lot experience in docker so maybe you can help me. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.