{"action":"closed","issue":{"url":"https://api.github.com/repos/bflad/chef-docker/issues/384","labels_url":"https://api.github.com/repos/bflad/chef-docker/issues/384/labels{/name}","comments_url":"https://api.github.com/repos/bflad/chef-docker/issues/384/comments","events_url":"https://api.github.com/repos/bflad/chef-docker/issues/384/events","html_url":"https://github.com/bflad/chef-docker/issues/384","id":102304494,"number":384,"title":"Error: cannot mount volume over existing file, file exists","user":{"login":"rudijs","id":1711940,"avatar_url":"https://avatars.githubusercontent.com/u/1711940?v=3","gravatar_id":"","url":"https://api.github.com/users/rudijs","html_url":"https://github.com/rudijs","followers_url":"https://api.github.com/users/rudijs/followers","following_url":"https://api.github.com/users/rudijs/following{/other_user}","gists_url":"https://api.github.com/users/rudijs/gists{/gist_id}","starred_url":"https://api.github.com/users/rudijs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rudijs/subscriptions","organizations_url":"https://api.github.com/users/rudijs/orgs","repos_url":"https://api.github.com/users/rudijs/repos","events_url":"https://api.github.com/users/rudijs/events{/privacy}","received_events_url":"https://api.github.com/users/rudijs/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-21T05:40:05Z","updated_at":"2015-08-21T05:50:13Z","closed_at":"2015-08-21T05:50:13Z","body":"Hi,\r\n\r\nUsing cookbook version 1.0.6 and Docker version 1.7.1, build 786b29d.\r\n\r\nI'm able to:\r\n\r\n    sudo docker run -v /home/ubuntu/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus\r\n\r\nBut the same in a recipe throws:\r\n\r\n    cannot mount volume over existing file, file exists /var/lib/docker/aufs/mnt/775ab3bbf662c0b29ae5e582ccc96b24c48378ce4ced2fd948f52dfdea765365/etc/prometheus/prometheus.yml\r\n\r\n```\r\ndocker_container \"rsm-prometheus\" do\r\n  repo \"prom/prometheus\"\r\n  volumes [\r\n              \"/home/ubuntu/prometheus.yml:/etc/prometheus/prometheus.yml\"\r\n          ]\r\nend\r\n```\r\n\r\nThe prometheus [docker](https://github.com/prometheus/prometheus/blob/master/Dockerfile#L11) file does create the prometheus.yml file.\r\n\r\nCommand line can \"mount over it\" but the cookbook throws.\r\n\r\nIt was working pre v1.0.0 but since upgrading it throws.\r\n\r\nAm I doing something wrong here?\r\n\r\nThanks.\r\n\r\nFull Error:\r\n\r\n```\r\nRecipe: docker-prometheus::prometheus\r\n  * docker_image[prom/prometheus] action pull_if_missing (up to date)\r\n  * template[/home/ubuntu/prometheus.yml] action create (up to date)\r\n  * docker_container[rsm-prometheus] action run_if_missing\r\n    \r\n    ================================================================================\r\n    Error executing action `run_if_missing` on resource 'docker_container[rsm-prometheus]'\r\n    ================================================================================\r\n    \r\n    Docker::Error::ServerError\r\n    --------------------------\r\n    cannot mount volume over existing file, file exists /var/lib/docker/aufs/mnt/b6c324476bb061ec9bf0146b6c5bc2575f2f487aead4df307e545f6de090cb3c/etc/prometheus/prometheus.ym\r\nl\r\n    \r\n    Cookbook Trace:\r\n    ---------------\r\n    /home/vagrant/chef-solo/cookbooks-2/docker/files/default/vendor/gems/docker-api-1.22.2/lib/docker/connection.rb:50:in `rescue in request'\r\n    /home/vagrant/chef-solo/cookbooks-2/docker/files/default/vendor/gems/docker-api-1.22.2/lib/docker/connection.rb:38:in `request'\r\n    /home/vagrant/chef-solo/cookbooks-2/docker/files/default/vendor/gems/docker-api-1.22.2/lib/docker/connection.rb:65:in `block (2 levels) in <class:Connection>'\r\n    /home/vagrant/chef-solo/cookbooks-2/docker/files/default/vendor/gems/docker-api-1.22.2/lib/docker/container.rb:231:in `create'\r\n    /home/vagrant/chef-solo/cookbooks-2/docker/libraries/provider_docker_container.rb:132:in `create_container'\r\n    /home/vagrant/chef-solo/cookbooks-2/docker/libraries/provider_docker_container.rb:191:in `block (2 levels) in <class:DockerContainer>'\r\n    /home/vagrant/chef-solo/cookbooks-2/docker/libraries/provider_docker_container.rb:190:in `block in <class:DockerContainer>'\r\n    /home/vagrant/chef-solo/cookbooks-2/docker/libraries/provider_docker_container.rb:256:in `block in <class:DockerContainer>'\r\n    /home/vagrant/chef-solo/cookbooks-2/docker/libraries/provider_docker_container.rb:263:in `block in <class:DockerContainer>'\r\n    \r\n    Resource Declaration:\r\n    ---------------------\r\n    # In /home/vagrant/chef-solo/cookbooks-3/docker-prometheus/recipes/prometheus.rb\r\n    \r\n     12: docker_container \"rsm-prometheus\" do\r\n     13:   repo \"prom/prometheus\"\r\n     14:   volumes [\r\n     15:               \"/home/ubuntu/prometheus.yml:/etc/prometheus/prometheus.yml\"\r\n     16:           ]\r\n     17: end\r\n    \r\n    Compiled Resource:\r\n    ------------------\r\n    # Declared in /home/vagrant/chef-solo/cookbooks-3/docker-prometheus/recipes/prometheus.rb:12:in `from_file'\r\n    \r\n    docker_container(\"rsm-prometheus\") do\r\n      action :run_if_missing\r\n      retries 0\r\n      retry_delay 2\r\n      default_guard_interpreter :default\r\n      declared_type :docker_container\r\n      cookbook_name :\"docker-prometheus\"\r\n      recipe_name \"prometheus\"\r\n      repo \"prom/prometheus\"\r\n      restart_policy \"no\"\r\n      volumes [\"/home/ubuntu/prometheus.yml:/etc/prometheus/prometheus.yml\"]\r\n      restart_maximum_retry_count 0\r\n      container_name \"rsm-prometheus\"\r\n      tag \"latest\"\r\n      attach_stderr true\r\n      attach_stdout true\r\n      memory 0\r\n      memory_swap 0\r\n    end\r\n    \r\n\r\nRunning handlers:\r\n[2015-08-21T05:37:16+00:00] ERROR: Running exception handlers\r\nRunning handlers complete\r\n[2015-08-21T05:37:16+00:00] ERROR: Exception handlers complete\r\n[2015-08-21T05:37:16+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out\r\nChef Client failed. 3 resources updated in 2.347715066 seconds\r\n[2015-08-21T05:37:16+00:00] ERROR: docker_container[rsm-prometheus] (docker-prometheus::prometheus line 12) had an error: Docker::Error::ServerError: cannot mount volume over existing file, file exists /var/lib/docker/aufs/mnt/b6c324476bb061ec9bf0146b6c5bc2575f2f487aead4df307e545f6de090cb3c/etc/prometheus/prometheus.yml\r\n\r\n[2015-08-21T05:37:16+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)\r\nERROR: RuntimeError: chef-solo failed. See output above.\r\n```"}}