title: How can my docker CLI application read a file from host?
body: <p>I made a simple command line app in go language to read a file and process it. I am trying to use docker to run the application. In the program, the first argument to the code is the file name with the location. Now the problem is I am not able to understand how can the contatiner code read a file from the local system. I am using the following docker codes to build and run the application:</p>
  <pre><code>docker build . -t go-dock
  docker run -p 3000:3000 go-dock file/file.json
  </code></pre>
  <p><code>file/file.json</code> is complete file name with file path in my case.
  I read about volumes but I understood that only a container can save data there. The problem is I want to read the file. So how can I do that?</p>