Saving a Docker image with boot2docker

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: container can't find domain on private network
  • Running Docker Under Vagrant
  • Revert a Docker container back to its original image without restarting it?
  • How to make sbt-native-packager combine two layers of docker image
  • Docker - how to setup connection to container to localhost
  • I would like to populate a entry in config file at run time via docker compose
  • 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.


    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

  • Docker upgrades failing due to conflicts
  • Docker COPY doesn't work
  • Mounting directories on ECS via API?
  • How to fix “invalid network mode default” when starting docker image
  • How can I make my Docker compose “wait-for-it” script invoke the original container ENTRYPOINT or CMD?
  • Relative path with zip in vrt file (vsizip)?
  • One Solution collect form web for “Saving a Docker image with boot2docker”

    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

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.