{"action":"created","issue":{"url":"https://api.github.com/repos/bmuschko/gradle-docker-plugin/issues/187","repository_url":"https://api.github.com/repos/bmuschko/gradle-docker-plugin","labels_url":"https://api.github.com/repos/bmuschko/gradle-docker-plugin/issues/187/labels{/name}","comments_url":"https://api.github.com/repos/bmuschko/gradle-docker-plugin/issues/187/comments","events_url":"https://api.github.com/repos/bmuschko/gradle-docker-plugin/issues/187/events","html_url":"https://github.com/bmuschko/gradle-docker-plugin/issues/187","id":144510382,"number":187,"title":"inputDir not working","user":{"login":"marbon87","id":2949525,"avatar_url":"https://avatars.githubusercontent.com/u/2949525?v=3","gravatar_id":"","url":"https://api.github.com/users/marbon87","html_url":"https://github.com/marbon87","followers_url":"https://api.github.com/users/marbon87/followers","following_url":"https://api.github.com/users/marbon87/following{/other_user}","gists_url":"https://api.github.com/users/marbon87/gists{/gist_id}","starred_url":"https://api.github.com/users/marbon87/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marbon87/subscriptions","organizations_url":"https://api.github.com/users/marbon87/orgs","repos_url":"https://api.github.com/users/marbon87/repos","events_url":"https://api.github.com/users/marbon87/events{/privacy}","received_events_url":"https://api.github.com/users/marbon87/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-03-30T09:00:41Z","updated_at":"2016-03-31T11:10:24Z","closed_at":null,"body":"Hi,\r\n\r\ni created the following gradle tasks to create a dockerfile and build a image from it:\r\n```\r\ntask testBaseDockerfile(type: Dockerfile){\r\n    ext.dockerImageName = 'test-base'\r\n    destFile = project.file('./build/dockerfiles/' + ext.dockerImageName + '/Dockerfile')\r\n    from(baseImage.dockerImageName + \":\" + baseImage.dockerImageVersion)\r\n    maintainer('me')\r\n    addFile(\"./\" , \"/opt\")\r\n}\r\n\r\ntask testBaseImage(type: DockerBuildImage){\r\n    dependsOn testBaseDockerfile\r\n    inputDir = project.projectDir\r\n    dockerFile = project.file('./build/dockerfiles/' + testBaseDockerfile.dockerImageName + '/Dockerfile')\r\n    tag = testBaseDockerfile.dockerImageName + ':' + jar.version\r\n}\r\n```\r\n\r\nI want to create a docker-image, that contains the whole project to run gradle tasks inside the docker-container. So i added the command ```addFile(\"./\" , \"/opt\")```. The problem is that only the files from ```./build/dockerfiles/test-base```are added to the context and to the docker-image. The container, that is created from the dockerfile, has only following content:\r\n```\r\nroot@7f3a7e5fe1ff:/opt# tree\r\n.\r\n└── build\r\n    └── dockerfiles\r\n        └── test-base\r\n            └── Dockerfile\r\n\r\n```\r\n\r\nI also tried the current master with docker-java 2.2.3, but the problem is the same."},"comment":{"url":"https://api.github.com/repos/bmuschko/gradle-docker-plugin/issues/comments/203881755","html_url":"https://github.com/bmuschko/gradle-docker-plugin/issues/187#issuecomment-203881755","issue_url":"https://api.github.com/repos/bmuschko/gradle-docker-plugin/issues/187","id":203881755,"user":{"login":"cdancy","id":7871459,"avatar_url":"https://avatars.githubusercontent.com/u/7871459?v=3","gravatar_id":"","url":"https://api.github.com/users/cdancy","html_url":"https://github.com/cdancy","followers_url":"https://api.github.com/users/cdancy/followers","following_url":"https://api.github.com/users/cdancy/following{/other_user}","gists_url":"https://api.github.com/users/cdancy/gists{/gist_id}","starred_url":"https://api.github.com/users/cdancy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdancy/subscriptions","organizations_url":"https://api.github.com/users/cdancy/orgs","repos_url":"https://api.github.com/users/cdancy/repos","events_url":"https://api.github.com/users/cdancy/events{/privacy}","received_events_url":"https://api.github.com/users/cdancy/received_events","type":"User","site_admin":false},"created_at":"2016-03-31T11:10:24Z","updated_at":"2016-03-31T11:10:24Z","body":"@marbon87 also you may want to try a path that is more absolute. From dockers point of view, when it executes the Dockerfile, it's looking at your './' and resolving that to the current directory."}}