Hello

I will insist on you should do some docker test outside vagrant to see what
docker does,

https://www.docker.com/tryit/

you back? cool, welcome back.

imagine docker create a vm that does nothing, since that is what docker is,
a 100% isolated enviroment.

Is more similar to what chroot is, uml (user mode linux), openVz, solaris
containers.. if you have had used any of those, docker is  bit ieasier to
get.

if you havent, then i can tell you that docker is not a virtualmachine.

Docker will create a OS filesystem, and run 1 or more commands and that is
what that docker container will run

example, lets say you want to run a web browser, docker require a image to
pull down, and some commands to run and some ports to expose.

are seral ways to do it, that's why is good to play and make your won way
to doit.

The ideal way for someone new:
 - pull a docker image that does everything!

this docker image will have already setup some commands to run and some
ports to expose

but that is not the docker way.

Docker way goes something like this.

- define a docker image to pull
- command to run (to setup the image)
- ports to expose
- command to run (to start the image)


without those, what you are doing is this:

- pull a docker image

done, you have an isolated filesystem and no process running from here.

from here you can:

- docker build, that allow you create a new docker image based on a
Dockerfile, that is a set of instructions
- docker run, execute commands on these images (base or new one)

the images are handled by an ID, but you can tag them for convenience.

Alvaro


On Sat, Oct 11, 2014 at 10:38 AM, Dirk Louwers <[email protected]
> wrote:

> Hi,
>
> Yes, I have now tried it with centos:centos6. Documentation incorrectly
> mentions centos:6. That still yields that error response. So how would I
> add a command and what command? The vagrant docs don't mention this. I was
> planning to provision the box with ansible. Does anyone know of an example
> of this?
>
> Best,
>
> Dirk
>
>
>
> 2014-10-09 22:42 GMT+02:00 Alvaro Miranda Aguilera <[email protected]>:
>
>> Hello,
>>
>> Docker is a cool new tech, but they do many things in a docker way that
>> is different than a virtual machine.
>>
>> Basically what you are doing in the vagrantfile is download a docker
>> image, but the name is wrong from what I see. plus the message is telling
>> you that you are not doing anything (no commands)
>>
>> index.docker.io have the boxes
>>
>> checking this:
>>
>> https://registry.hub.docker.com/_/centos/tags/manage/
>>
>> seems the name is like:
>>
>> centos:centos6
>>
>> and you need to add a command, docker will run a command, imagine a new
>> vm boots out of nothing and 1 command run, there is no boot like a normal
>> OS.
>>
>> so if you run a web server, that will be the only process running inside
>> docker.
>>
>> I would suggest you play a bit with docker outside vagrant first if you
>> haven't done, as that will make things go clear.
>>
>> Alvaro.
>>
>>
>>
>>
>> On Fri, Oct 10, 2014 at 12:34 AM, Dirk Louwers <
>> [email protected]> wrote:
>>
>>> Hi,
>>>
>>> I am new to using Vagrant with Docker and ran into the following issue:
>>>
>>> Given the following block:
>>>
>>> config.vm.provider "docker" do |d|
>>>   d.image = "centos:6"
>>> end
>>>
>>> and the following command:
>>>
>>> vagrant up --provider=docker
>>>
>>> I get the following error:
>>>
>>> Error response from daemon: No command specified
>>>
>>> Since the machine is down asking for logs through vagrant docker-logs
>>> crashes so I have no clue how to debug this.
>>>
>>>
>>> Hope someone can shed some light on this. Googling hasn't helped me much
>>> so far.
>>>
>>>
>>> Best,
>>>
>>>
>>> Dirk
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Vagrant" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Vagrant" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/vagrant-up/VqXBSaEXBdU/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to