{"action":"created","issue":{"url":"https://api.github.com/repos/testcontainers/testcontainers-java/issues/681","repository_url":"https://api.github.com/repos/testcontainers/testcontainers-java","labels_url":"https://api.github.com/repos/testcontainers/testcontainers-java/issues/681/labels{/name}","comments_url":"https://api.github.com/repos/testcontainers/testcontainers-java/issues/681/comments","events_url":"https://api.github.com/repos/testcontainers/testcontainers-java/issues/681/events","html_url":"https://github.com/testcontainers/testcontainers-java/issues/681","id":320102525,"node_id":"MDU6SXNzdWUzMjAxMDI1MjU=","number":681,"title":"copyFileFromContainer returns an empty file if file permissions inside docker container don't have w for owner user","user":{"login":"xtrm0","id":1348329,"node_id":"MDQ6VXNlcjEzNDgzMjk=","avatar_url":"https://avatars2.githubusercontent.com/u/1348329?v=4","gravatar_id":"","url":"https://api.github.com/users/xtrm0","html_url":"https://github.com/xtrm0","followers_url":"https://api.github.com/users/xtrm0/followers","following_url":"https://api.github.com/users/xtrm0/following{/other_user}","gists_url":"https://api.github.com/users/xtrm0/gists{/gist_id}","starred_url":"https://api.github.com/users/xtrm0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xtrm0/subscriptions","organizations_url":"https://api.github.com/users/xtrm0/orgs","repos_url":"https://api.github.com/users/xtrm0/repos","events_url":"https://api.github.com/users/xtrm0/events{/privacy}","received_events_url":"https://api.github.com/users/xtrm0/received_events","type":"User","site_admin":false},"labels":[{"id":868296450,"node_id":"MDU6TGFiZWw4NjgyOTY0NTA=","url":"https://api.github.com/repos/testcontainers/testcontainers-java/labels/resolution/acknowledged","name":"resolution/acknowledged","color":"fef2c0","default":false},{"id":198678879,"node_id":"MDU6TGFiZWwxOTg2Nzg4Nzk=","url":"https://api.github.com/repos/testcontainers/testcontainers-java/labels/type/bug","name":"type/bug","color":"d4c5f9","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-05-03T22:32:43Z","updated_at":"2018-08-05T21:37:42Z","closed_at":"2018-08-05T06:09:00Z","author_association":"NONE","body":"Whenever I copyFileFromContainer I always get an empty file, even though the same command using `docker cp` executes correctly.\r\n\r\nI'm not sure how to provide more information, so here goes my configuration:\r\n\r\nI have a docker image with the following start script, that generates the file server_pub.pem:\r\n```\r\nset -e\r\npd=`pwd`\r\ncd src/main/resources/\r\nopenssl ecparam -name secp256k1 -genkey -noout -out server_prv.pem\r\nopenssl ec -in server_prv.pem -pubout -out server_pub.pem\r\ncd $pd\r\njava -jar server.jar\r\n```\r\n\r\nAnd when I run outside this image the copyFileFromContainer I get an empty file:\r\n```\r\nserver = new GenericContainer(\"gennsecserver:latest\").withExposedPorts(8080).waitingFor(Wait.forHttp(\"/api/ping\"));\r\nserver.start();\r\nPath tempDirectory = Files.createTempDirectory(\"\");\r\nString targetPubKeyPath = tempDirectory.toAbsolutePath().toString() + \"/server_pub.pem\";\r\nString baseurl = \"http://\" + server.getContainerIpAddress() + \":\" + server.getMappedPort(8080);\r\nserver.copyFileFromContainer(\"/home/secserv/src/main/resources/server_pub.pem\", targetPubKeyPath);\r\n```\r\n\r\nBut if I run docker cp I get a valid file:\r\n```\r\ndocker cp 5dea99a39571:/home/secserv/src/main/resources/server_pub.pem ./\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/testcontainers/testcontainers-java/issues/comments/410549926","html_url":"https://github.com/testcontainers/testcontainers-java/issues/681#issuecomment-410549926","issue_url":"https://api.github.com/repos/testcontainers/testcontainers-java/issues/681","id":410549926,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDU0OTkyNg==","user":{"login":"rnorth","id":132175,"node_id":"MDQ6VXNlcjEzMjE3NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/132175?v=4","gravatar_id":"","url":"https://api.github.com/users/rnorth","html_url":"https://github.com/rnorth","followers_url":"https://api.github.com/users/rnorth/followers","following_url":"https://api.github.com/users/rnorth/following{/other_user}","gists_url":"https://api.github.com/users/rnorth/gists{/gist_id}","starred_url":"https://api.github.com/users/rnorth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rnorth/subscriptions","organizations_url":"https://api.github.com/users/rnorth/orgs","repos_url":"https://api.github.com/users/rnorth/repos","events_url":"https://api.github.com/users/rnorth/events{/privacy}","received_events_url":"https://api.github.com/users/rnorth/received_events","type":"User","site_admin":false},"created_at":"2018-08-05T21:37:42Z","updated_at":"2018-08-05T21:37:42Z","author_association":"MEMBER","body":"We've released [1.8.3](https://github.com/testcontainers/testcontainers-java/releases/tag/1.8.3) which hopefully fixes this issue. Please could you try it out?"}}
{"actor":{"display_login":"rnorth"}}