Docker Community Forums

Share and learn in the Docker community.

Saving a docker image?


(Krischu) #1

First off: I’m new to docker and I’m running it under Windows 7 Pro.
I’ve installed Docker quickstart Terminal and Kitematic together with virtualbox that came with it.

Now I started to experiment with an image that I pulled from somewhere. This is already a point to understand: Where did I pull it from? Out of thin air? I gave a command

docker pull in a quickstart window if I recall right, giving just a name.
After I gave a docker run command I got into a root prompt.

The first thing I notice is that I cannot see my c:\Users\me directory although I can see it in the boot2docker windows as /c/Users/me.

The machine that I ran was started with

docker run --name some_name -ti -v /Users:/Users etc. etc. /bin/bash

No my question: When I do changes to the docker-machine I’m currently running, are they volatile? Can I save my work and start the machine as “my-machine” locally later?

I suspect I have to restart the machine giving a different mount command to access my Windows Users directory.

Help appreciated.


Christoph


(Kostasmistos) #2

Hi,

If you are just typing "docker pull " your are pulling from the public docker hub registry and all the available repositories existing there.

Regarding your boot2docker machine:
-assuming you created a machine and you are not using the default one, whatever changes you make persists when you shutdown and restart the machine.
-from the quickstart terminal you should be able to see your /c/User directory
-from inside the boot2docker Virtual Machine (I guess you are connecting via ssh) you are not able to see the /c/Users directory

  • from inside a container running in the boot2docker VM if you have mounted like " -v /Users:/Users" you should see only a directory stucture with your name and nothing below it. This is normal because you mounting directories on docker refers to mount a folder from the DockerHostMachine -> to the container. In your case since you run on Windows your DockerHost is the boot2docker VM and not your Windows.

If your want to have a Windows directory mounted inside a container you have to create first a shared folder between your Windows and the Virtual Machine and then mount this folder to a container.


(Krischu) #3

-from the quickstart terminal you should be able to see your /c/User directory
-from inside the boot2docker Virtual Machine (I guess you are
connecting via ssh) you are not able to see the /c/Users directory

kostasmistos,

just the opposite is the case:
I can see

df

c/Users mounted on /c/Users from withing the boot2docker VM image

but not from within any docker-machine I’m running in the quickstart terminal (!)

BTW, I still find it confusing to talk about a “boot2docker” VM while boot2docker is deprecated, anyway.

I’m not using ssh. Just running in quickstart-terminal


Christoph