title: How to pass a config file into docker for windows
body: <p>I am trying to run the official latest redis docker image located here:</p>
  <p><a href="https://hub.docker.com/_/redis" rel="nofollow noreferrer">https://hub.docker.com/_/redis</a></p>
  <p>I want to pass it in a custom config file.</p>
  <p>To test I downloaded the sample config file from here:</p>
  <p><a href="https://redis.io/topics/config" rel="nofollow noreferrer">https://redis.io/topics/config</a></p>
  <p>I stored the file in:</p>
  <p>C:/Users//redis/config/redis.config</p>
  <p>I changed directory to the redis/config folder (in powershell) and execute the command:</p>
  <pre><code>docker run -it --rm --name redis --net redis -v ${pwd}:/config redis redis-server redis.conf
  </code></pre>
  <p>and I get the following error:</p>
  <pre><code>Fatal error, can't open config file '/data/redis.conf': No such file or directory
  </code></pre>
  <p>I have also tried the command:</p>
  <pre><code>docker run -it --rm --name redis --net redis -v ${PWD}/config:/etc/redis/ redis redis-server C:\Users\&lt;username&gt;\redis\config\redis.conf
  </code></pre>
  <p>Which gives me a similar error:</p>
  <pre><code>Fatal error, can't open config file '/data/C:\Users\&lt;username&gt;\redis\config\redis.conf': No such file or directory
  </code></pre>
  <p>It seems to me that it is looking for the config file local in the containers \data directory...</p>
  <p>Shouldn't I be passing it from the local machines file structure?</p>
  <p>How do I execute this command from windows so that the local conf is loaded by the containerized machine.</p>