Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker export creates empty files on failure #549

Closed
askb opened this issue Nov 8, 2015 · 2 comments
Closed

docker export creates empty files on failure #549

askb opened this issue Nov 8, 2015 · 2 comments

Comments

@askb
Copy link

askb commented Nov 8, 2015

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.

$ docker ps -a
CONTAINER ID        IMAGE                COMMAND                  CREATED             STATUS                     PORTS               NAMES
c15dc668f4ab        hello-world:latest   "bash"                   2 minutes ago       Created                                        evil_blackwell
7769a41cfbc0        registry:2           "/bin/registry /etc/d"   10 days ago         Exited (2) 4 minutes ago                       registry

$ docker export -o hello.tar hello-world:latest 
Error response from daemon: no such id: hello-world:latest

$ ls -l hello.tar 
-rw-rw-r-- 1 abelur abelur 0 Nov  8 17:58 hello.tar    

$ docker info
Containers: 2
Images: 195
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 199
 Dirperm1 Supported: false
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 3.13.0-65-generic
Operating System: Ubuntu 14.04.3 LTS
CPUs: 4
Total Memory: 7.689 GiB
Name: srv-182
ID: Q7CC:FNYP:4OWW:Q4FW:HHVL:KORD:AS6L:6AGN:6I3D:LRZG:NBWO:ZDXC
Debug mode (server): true
File Descriptors: 12
Goroutines: 19
System Time: 2015-11-08T18:01:37.009613104+05:30
EventsListeners: 0
Init SHA1: 70b0cda2ecbf0d9fb1879ed198a66ad09a3dc50c
Init Path: /usr/lib/docker/dockerinit
Docker Root Dir: /var/lib/docker
Username: askb
Registry: https://index.docker.io/v1/
WARNING: No swap limit support

$ docker version 
Client:
 Version:      1.8.3
 API version:  1.20
 Go version:   go1.4.2
 Git commit:   f4bf5c7
 Built:        Mon Oct 12 05:37:18 UTC 2015
 OS/Arch:      linux/amd64

Server:
 Version:      1.8.3
 API version:  1.20
 Go version:   go1.4.2
 Git commit:   f4bf5c7
 Built:        Mon Oct 12 05:37:18 UTC 2015
 OS/Arch:      linux/amd64

 uname -a
Linux 3.13.0-65-generic #106-Ubuntu SMP Fri Oct 2 22:08:27 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

@chasebolt
Copy link
Contributor

This sounds like a bug you should file with docker.

On Sunday, November 8, 2015, askb [email protected] wrote:

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.

$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c15dc668f4ab hello-world:latest "bash" 2 minutes ago Created evil_blackwell
7769a41cfbc0 registry:2 "/bin/registry /etc/d" 10 days ago Exited (2) 4 minutes ago registry

$ docker export -o hello.tar hello-world:latest
Error response from daemon: no such id: hello-world:latest

$ ls -l hello.tar
-rw-rw-r-- 1 abelur abelur 0 Nov 8 17:58 hello.tar

$ docker info
Containers: 2
Images: 195
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 199
Dirperm1 Supported: false
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 3.13.0-65-generic
Operating System: Ubuntu 14.04.3 LTS
CPUs: 4
Total Memory: 7.689 GiB
Name: srv-182
ID: Q7CC:FNYP:4OWW:Q4FW:HHVL:KORD:AS6L:6AGN:6I3D:LRZG:NBWO:ZDXC
Debug mode (server): true
File Descriptors: 12
Goroutines: 19
System Time: 2015-11-08T18:01:37.009613104+05:30
EventsListeners: 0
Init SHA1: 70b0cda2ecbf0d9fb1879ed198a66ad09a3dc50c
Init Path: /usr/lib/docker/dockerinit
Docker Root Dir: /var/lib/docker
Username: askb
Registry: https://index.docker.io/v1/
WARNING: No swap limit support

$ docker version
Client:
Version: 1.8.3
API version: 1.20
Go version: go1.4.2
Git commit: f4bf5c7
Built: Mon Oct 12 05:37:18 UTC 2015
OS/Arch: linux/amd64

Server:
Version: 1.8.3
API version: 1.20
Go version: go1.4.2
Git commit: f4bf5c7
Built: Mon Oct 12 05:37:18 UTC 2015
OS/Arch: linux/amd64

uname -a
Linux 3.13.0-65-generic #106-Ubuntu SMP Fri Oct 2 22:08:27 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux


Reply to this email directly or view it on GitHub
#549.

@askb askb closed this as completed Nov 8, 2015
@askb
Copy link
Author

askb commented Nov 8, 2015

Sorry, my bad! Have closed the issue now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants