{"record":{"id":"fb54d54b714e2afa","repo":"hashicorp/vagrant","slug":"host-path-host-exists-as-a-volumes-key-and","errorCode":null,"errorMessage":"Host path `%{host}` exists as a `volumes` key and is a folder on disk. Vagrant\nwill not expand this key like it used to and instead leave it as is defined.\nIf this folder is intended to be used, make sure its full path is defined\nin your `volumes` config. More information can be found on volumes in the\ndocker compose documentation.","messagePattern":"Host path `%(.+?)` exists as a `volumes` key and is a folder on disk\\. Vagrant\nwill not expand this key like it used to and instead leave it as is defined\\.\nIf this folder is intended to be used, make sure its full path is defined\nin your `volumes` config\\. More information can be found on volumes in the\ndocker compose documentation\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugins/providers/docker/driver/compose.rb","lineNumber":120,"sourceCode":"          end\n          ports   = Array(params[:ports])\n          volumes = Array(params[:volumes]).map do |v|\n            v = v.to_s\n            host, guest = v.split(\":\", 2)\n            if v.include?(\":\") && (Vagrant::Util::Platform.windows? || Vagrant::Util::Platform.wsl?)\n              host = Vagrant::Util::Platform.windows_path(host)\n              # NOTE: Docker does not support UNC style paths (which also\n              # means that there's no long path support). Hopefully this\n              # will be fixed someday and the gsub below can be removed.\n              host.gsub!(/^[^A-Za-z]+/, \"\")\n            end\n            # if host path is a volume key, don't expand it.\n            # if both exist (a path and a key) show warning and move on\n            # otherwise assume it's a realative path and expand the host path\n            compose_config = get_composition\n            if compose_config[\"volumes\"] && compose_config[\"volumes\"].keys.include?(host)\n              if File.directory?(@machine.env.cwd.join(host).to_s)\n                @machine.env.ui.warn(I18n.t(\"docker_provider.volume_path_not_expanded\",\n                                           host: host))\n              end\n            else\n              @logger.debug(\"Path expanding #{host} to current Vagrant working dir instead of docker-compose config file directory\")\n              host = @machine.env.cwd.join(host).to_s\n            end\n            \"#{host}:#{guest}\"\n          end\n          cmd     = Array(params.fetch(:cmd))\n          env     = Hash[*params.fetch(:env).flatten.map(&:to_s)]\n          expose  = Array(params[:expose])\n          @logger.debug(\"Creating container `#{name}`\")\n          begin\n            update_args = [:apply]\n            update_args.push(:detach) if params[:detach]\n            update_args << block\n            update_composition(*update_args) do |composition|\n              services = composition[\"services\"] ||= {}","sourceCodeStart":102,"sourceCodeEnd":138,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/providers/docker/driver/compose.rb#L102-L138","documentation":"Error \"Host path `%{host}` exists as a `volumes` key and is a folder on disk. Vagrant\nwill not expand this key like it used to and instead leave it as is defined.\nIf this folder is intended to be used, make sure its full path is defined\nin your `volumes` config. More information can be found on volumes in the\ndocker compose documentation.\" thrown in hashicorp/vagrant.","triggerScenarios":"Thrown at plugins/providers/docker/driver/compose.rb:120 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}