{"action":"closed","issue":{"url":"https://api.github.com/repos/someara/chef-docker/issues/549","labels_url":"https://api.github.com/repos/someara/chef-docker/issues/549/labels{/name}","comments_url":"https://api.github.com/repos/someara/chef-docker/issues/549/comments","events_url":"https://api.github.com/repos/someara/chef-docker/issues/549/events","html_url":"https://github.com/someara/chef-docker/issues/549","id":115731714,"number":549,"title":"docker export creates empty files on failure","user":{"login":"askb","id":7709595,"avatar_url":"https://avatars.githubusercontent.com/u/7709595?v=3","gravatar_id":"","url":"https://api.github.com/users/askb","html_url":"https://github.com/askb","followers_url":"https://api.github.com/users/askb/followers","following_url":"https://api.github.com/users/askb/following{/other_user}","gists_url":"https://api.github.com/users/askb/gists{/gist_id}","starred_url":"https://api.github.com/users/askb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/askb/subscriptions","organizations_url":"https://api.github.com/users/askb/orgs","repos_url":"https://api.github.com/users/askb/repos","events_url":"https://api.github.com/users/askb/events{/privacy}","received_events_url":"https://api.github.com/users/askb/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-08T12:37:02Z","updated_at":"2015-11-08T18:18:17Z","closed_at":"2015-11-08T18:18:17Z","body":"Should the `docker export` command create empty files when the container is not exported successfully ? The error message returned is valid, however zero byte file should not be created on-disk.\r\n\r\n```\r\n$ docker ps -a\r\nCONTAINER ID        IMAGE                COMMAND                  CREATED             STATUS                     PORTS               NAMES\r\nc15dc668f4ab        hello-world:latest   \"bash\"                   2 minutes ago       Created                                        evil_blackwell\r\n7769a41cfbc0        registry:2           \"/bin/registry /etc/d\"   10 days ago         Exited (2) 4 minutes ago                       registry\r\n\r\n$ docker export -o hello.tar hello-world:latest \r\nError response from daemon: no such id: hello-world:latest\r\n\r\n$ ls -l hello.tar \r\n-rw-rw-r-- 1 abelur abelur 0 Nov  8 17:58 hello.tar    \r\n\r\n$ docker info\r\nContainers: 2\r\nImages: 195\r\nStorage Driver: aufs\r\n Root Dir: /var/lib/docker/aufs\r\n Backing Filesystem: extfs\r\n Dirs: 199\r\n Dirperm1 Supported: false\r\nExecution Driver: native-0.2\r\nLogging Driver: json-file\r\nKernel Version: 3.13.0-65-generic\r\nOperating System: Ubuntu 14.04.3 LTS\r\nCPUs: 4\r\nTotal Memory: 7.689 GiB\r\nName: srv-182\r\nID: Q7CC:FNYP:4OWW:Q4FW:HHVL:KORD:AS6L:6AGN:6I3D:LRZG:NBWO:ZDXC\r\nDebug mode (server): true\r\nFile Descriptors: 12\r\nGoroutines: 19\r\nSystem Time: 2015-11-08T18:01:37.009613104+05:30\r\nEventsListeners: 0\r\nInit SHA1: 70b0cda2ecbf0d9fb1879ed198a66ad09a3dc50c\r\nInit Path: /usr/lib/docker/dockerinit\r\nDocker Root Dir: /var/lib/docker\r\nUsername: askb\r\nRegistry: https://index.docker.io/v1/\r\nWARNING: No swap limit support\r\n\r\n$ docker version \r\nClient:\r\n Version:      1.8.3\r\n API version:  1.20\r\n Go version:   go1.4.2\r\n Git commit:   f4bf5c7\r\n Built:        Mon Oct 12 05:37:18 UTC 2015\r\n OS/Arch:      linux/amd64\r\n\r\nServer:\r\n Version:      1.8.3\r\n API version:  1.20\r\n Go version:   go1.4.2\r\n Git commit:   f4bf5c7\r\n Built:        Mon Oct 12 05:37:18 UTC 2015\r\n OS/Arch:      linux/amd64\r\n\r\n uname -a\r\nLinux 3.13.0-65-generic #106-Ubuntu SMP Fri Oct 2 22:08:27 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux\r\n\r\n```\r\n\r\n"}}