title: Ubuntu and Docker: Error response from daemon: error while creating mount source path
body: <p>I want to use a volume mounted on my container but it throws the next error when trying to run:</p>
  <blockquote>
  <p>docker: Error response from daemon: error while creating mount source
  path '/var/skeeter/templates': mkdir /var/skeeter: read-only file
  system.</p>
  </blockquote>
  <p>This is my Dockerfile:</p>
  <pre><code>FROM maven:3-jdk-13-alpine
  
  RUN mkdir -p /var/container/skeeter/templates
  
  WORKDIR /project
  ADD ./target/skeeter-0.0.1-SNAPSHOT.jar skeeter-0.0.1-SNAPSHOT.jar
  
  EXPOSE 8080
  
  CMD java -jar skeeter-0.0.1-SNAPSHOT.jar
  </code></pre>
  <p>And this is the run cmd:</p>
  <blockquote>
  <p>docker run -t -p 8080:8080 -v
  /var/skeeter/templates:/var/container/skeeter/templates --name
  skeeter-docker-container skeeter-docker-image:latest</p>
  </blockquote>
  <p>This is the CMD output when i'm checking the directories permissions:</p>
  <pre><code>ls -l /var/skeeter/
  total 4 drwxrwxrwx 2 root root 4096 ago 11 16:45 templates
  
  ls -ld /var/skeeter/
  drwxrwxrwx 3 root root 4096 ago 11 16:45 /var/skeeter/
  </code></pre>
  <p>Update:
  I created a new Volume and used its name at -v parameter and it runned, but java app cannot find files inside the directory</p>