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:

  • Accessing database that is running inside a docker container?
  • docker-machine ssh command for mongodump
  • Adding custom settings into boot2docker profile
  • Sending a file as a parameter to a container in order to be compiled causes problems
  • Why does echo $VARIABLE, within a /bin/bash -c “…” section of a dockerfile run instruction, return empty on docker build?
  • 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

  • OSX boot2docker trouble connecting to docker daemon
  • How to add Dockerfile to a docker registry page?
  • How to tell Docker client location of Notary Server?
  • installing ssh in the docker containers
  • Docker-machine create with generic driver, Certificates not working but SSH does
  • Why docker build is so slow
  • 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.