title: Permission denied when changing docker image folder
body: <p>I have a container running docker inside it, but would like to be able to use a mounted folder from the host to store the images etc. </p>
  
  <p>Inside my container I have modified /etc/default/docker to include <code>DOCKER_OPTS="-g /root/docker"</code> but when I try to restart the docker service I get the following error:</p>
  
  <p><code>/etc/init.d/docker: 1: /etc/default/docker: /root/docker: Permission denied</code></p>
  
  <p>I've set the permissions for that folder to fully permissive but I'm still facing the same issue.</p>
  
  <p>Can anyone help?</p>