Lurker News

Comments (132) 44 threads

Show all comments

Showing thread 13 of 44

chubot2 replies#
Just curious, how are people building Docker images these days? Doesn't it only run on 64-bit Linux? I have a 32 bit Linux desktop and a Mac and haven't gotten around to installing Docker. At work I have a 64 bit Linux desktop and it seemed to be extremely picky about the kernel version so I gave up.

Are people running Linux VMs on their Macs to build containers?
I like the idea of this service. But both the client side and the server side have to be easy. Unless I'm missing something it seems like they made the server side really easy, but the client side is still annoying.

dekz1 reply#
I'm building docker images on 64-bit linux (ubuntu) and maintaining a repo of Dockerfiles, instead of uploading to the docker repository.

You need a recent version of the linux kernel that supports Linux Containers. It's best if you can run Ubuntu 13 somewhere.
> Are people running Linux VMs on their Macs to build containers?
FreeBSD supports jails which are similar to linux containers in a way, but OSX does not. So unfortunately you're going to have to run a VM, checkout vagrant and docker though. [1]
[1]: http://docs.docker.io/en/latest/installation/vagrant/

wmf#
No amount of jails or seatbelts is going to allow you to run a Linux executable on a Darwin kernel, though.
Lazare2 replies#
Yes. Emerging best practices seems to be to use Vagrant to create a great development environment, then use docker containers inside that for isolation. The two work together quite well. There's a comment from the Vagrant creator here about that: https://news.ycombinator.com/item?id=6291549

In short, yes, just run a VM.

chubot2 replies#
So I already use Linux almost exclusively for development, and VMs are not in my workflow at all. It seems bizarre to build a VM to build a container! Like too many levels of yak shaving.
TheMakeA1 reply#
All of my projects now include a Vagrantfile. It makes managing dependencies and creating repeatable environments simple.

The work flow is:

  $ vagrant up
  $ vagrant ssh
Editing and committing changes take place on the host. Running servers, tests, building Docker containers, etc, takes place on the guest.

You can get a new device ready for hacking on a project in minutes. Just git clone, vagrant up, grab a quick coffee.
I would definitely recommend putting VMs in your work flow.

Continue this thread — 1 reply

Lazare2 replies#
> It seems bizarre to build a VM to build a container! Like too many levels of yak shaving.

Perhaps, but you just said:
> I have a 32 bit Linux desktop and a Mac and haven't gotten around to installing Docker. At work I have a 64 bit Linux desktop and it seemed to be extremely picky about the kernel version so I gave up.
Precisely. Hence VMs, because Vagrant makes it trivial to spin up an instance configured however you like.
You're basically saying "I have a problem installing Docker, but I don't need a VM because I don't have any problems a VM would solve", but this is nonsense because this is the precise problem development VMs are meant to solve.

Continue this thread — 2 replies

cryptolect2 replies#
I don't get the need for Vagrant? Are you suggesting to use Vagrant solely for those not developing on a host capable of running Docker? If my host _can_ run Docker, what value do I get from running it inside Vagrant instead?
shykes#
We recommend using vagrant as a simple vm management tool, to quickly get a simple VM on your machine.

If your host can already run docker containers, you don't need vagrant.

Lazare#
Vagrant is a useful way to very quickly get a Docker capable host. You wouldn't use it for production, no.

For development, if you're running on OS X or Windows (in which case, my condolences), you basically have to use a VM. If developing on Linux, it's a tossup; the complexity and overhead of Vagrant versus the pain and annoyance of fooling around with kernels and dependencies.
I use a Mac for day-to-day development, so a simple Vagrant VM is a no-brainer. :)