0

For starters, I'm pretty new to Docker. I've created a simple image which I would like to share. As publishing to the hub is not an option, I'm trying out the docker save command. I'm on Windows 7, so I'm using Docker with boot2docker. Saving an image does not work. I've tried the following commands without success:

With a Linux path:

docker save -o /home/image.tar image:tag
docker save image:tag > /home/image.tar

With a Windows path:

docker save -o C:/Temp/image.tar image:tag
docker save image:tag > C:/Temp/image.tar

Whenever I use a Linux path, boot2docker just hangs (or idles). When I use a Windows path, it says "no such file or directory".

What am I missing here? Thanks.

EDIT

When I run docker in debug mode, I'm getting the following output (only the last lines are pasted here). It just seems to stop...

EBU[0213] rendered layer for bbfcd8330926bb09da7b27af1d0d2ca001b52ff1b101c91a7287fa65072aaa64 of [84992] size
NFO[0213] -job image_tarlayer(bbfcd8330926bb09da7b27af1d0d2ca001b52ff1b101c91a7287fa65072aaa64) = OK (0)
NFO[0213] +job image_get(bbfcd8330926bb09da7b27af1d0d2ca001b52ff1b101c91a7287fa65072aaa64)
NFO[0213] -job image_get(bbfcd8330926bb09da7b27af1d0d2ca001b52ff1b101c91a7287fa65072aaa64) = OK (0)
NFO[0213] +job image_inspect(7b66ebf8de49669f1020dcdb8769f8919475aff826bc3f366ea637d5d96fd354)
NFO[0213] -job image_inspect(7b66ebf8de49669f1020dcdb8769f8919475aff826bc3f366ea637d5d96fd354) = OK (0)
NFO[0213] +job image_tarlayer(7b66ebf8de49669f1020dcdb8769f8919475aff826bc3f366ea637d5d96fd354)
EBU[0213] rendered layer for 7b66ebf8de49669f1020dcdb8769f8919475aff826bc3f366ea637d5d96fd354 of [3072] size
NFO[0213] -job image_tarlayer(7b66ebf8de49669f1020dcdb8769f8919475aff826bc3f366ea637d5d96fd354) = OK (0)
NFO[0213] +job image_get(7b66ebf8de49669f1020dcdb8769f8919475aff826bc3f366ea637d5d96fd354)
NFO[0213] -job image_get(7b66ebf8de49669f1020dcdb8769f8919475aff826bc3f366ea637d5d96fd354) = OK (0)
NFO[0213] +job image_inspect(7409a59cd6a36265e3548b778dd2eb7e6ae3043a5532770d4468d1812d8561ff)
NFO[0213] -job image_inspect(7409a59cd6a36265e3548b778dd2eb7e6ae3043a5532770d4468d1812d8561ff) = OK (0)
NFO[0213] +job image_tarlayer(7409a59cd6a36265e3548b778dd2eb7e6ae3043a5532770d4468d1812d8561ff)
EBU[0213] rendered layer for 7409a59cd6a36265e3548b778dd2eb7e6ae3043a5532770d4468d1812d8561ff of [3584] size
NFO[0213] -job image_tarlayer(7409a59cd6a36265e3548b778dd2eb7e6ae3043a5532770d4468d1812d8561ff) = OK (0)
NFO[0213] +job image_get(7409a59cd6a36265e3548b778dd2eb7e6ae3043a5532770d4468d1812d8561ff)
NFO[0213] -job image_get(7409a59cd6a36265e3548b778dd2eb7e6ae3043a5532770d4468d1812d8561ff) = OK (0)
NFO[0213] +job image_inspect(c47858ae54b487c13117fc78daeb6e871693d1c5f23d51440934940c874bed0a)
NFO[0213] -job image_inspect(c47858ae54b487c13117fc78daeb6e871693d1c5f23d51440934940c874bed0a) = OK (0)
NFO[0213] +job image_tarlayer(c47858ae54b487c13117fc78daeb6e871693d1c5f23d51440934940c874bed0a)

EDIT 2

After a while, the connection seems to be lost (no surprise...)

Connection to localhost closed by remote host.
error in run: exit status 65535
tstorms
  • 4,941
  • 1
  • 25
  • 47

1 Answers1

0

Use Pipe viewer to check what is going on with, for example, docker save image:tag | pv > /home/image.tar and you will see the rate of the copy. And I wonder if the Windows syntax should be something like docker save -o C:\Temp\image.tar image:tag (to install Pipe Viewer on Linux, sudo apt-get install pv , or check http://www.ivarch.com/programs/pv.shtml)

user2915097
  • 30,758
  • 6
  • 57
  • 59
  • You are right about the Windows paths, should have noticed that... When I change the slashes to backslashes, I'm seeing the same behavior as with the Linux paths. How can I install pv, when even apt-get isn't available in boot2docker? – tstorms Mar 03 '15 at 13:45
  • I had overlooked boot2docker is not a full Linux :-( What is the size of your image ? How long did you wait before giving up on `docker save` ? Check with `docker events` what is going on, see the doc https://docs.docker.com/reference/commandline/cli/#events – user2915097 Mar 03 '15 at 13:54
  • I've waited 10 minutes for 650 MB so that shouldn't be an issue. Not sure how I should execute `docker events` when `docker save` is idle (or whatever it is doing). My key strokes aren't picked up in the console while it's running. – tstorms Mar 03 '15 at 14:13
  • launch at any time `docker events --since '2015-03-03'` and see what it shows. – user2915097 Mar 03 '15 at 14:24
  • It shows me nothing. What's strange though, is that I can still access the console and type whatever I want (it does not respond to what I typ). And that's exactly the behavior I'm seeing when I run the `docker save` command. Maybe something else is going on here? – tstorms Mar 03 '15 at 14:57
  • kill -9 the docker daemon, and restart it in debug mode `To run the daemon with debug output, use docker -d -D.` (extract from https://docs.docker.com/reference/commandline/cli/) – user2915097 Mar 03 '15 at 15:07
  • Please see my updated question for debug logs. Everything is going just fine, until its stops without any apparent reason. I'm doing all this via SSH (`boot2docker ssh`), is that maybe a clue? – tstorms Mar 03 '15 at 15:36
  • maybe `boot2docker init` will help (no guarantee, use at your own risk) – user2915097 Mar 03 '15 at 16:02
  • That outputs `Virtual machine boot2docker-vm already exists`. Seems Docker doesn't play nice on my machine... – tstorms Mar 03 '15 at 16:04
  • maybe http://stackoverflow.com/questions/25143819/docker-does-not-run-on-windows-error can help – user2915097 Mar 03 '15 at 16:17