• Members 46 posts
    Sept. 1, 2019, 1:01 p.m.

    Has anyone used Docker before. It creates really lightweight vm's it calls containers and there are images for everything from Ubuntu to PostgreSQL servers already available for use with it. I started learning it for my senior project and it seems like a really great way to encapsulate parts of project for testing and production.

  • Sept. 1, 2019, 3:56 p.m.

    This site runs all its components in docker :)

    One pretty big distinction - docker containers are not VMs. VMs have a fairly strong overhead and are frequently independent of one another if they exist on the same device (many cloud infrastructure services split a beefy server like slices of a pie into smaller VMs). Docker containers run within a system using what are called control groups (or cgroups for short). There is a shared access to resources at the kernel level, but complete separation of the user space beyond that. That's what enables the level of encapsulation while also being lighter-weight than VMs.

    Another way to think about this:
    VMs are like houses. They get all of their own plumbing from the street, their own garbage cans, their own natural gas lines. All of that has to be built up for them, but as a house their a fairly self-contained unit.
    Containers are like apartments. They share a lot of the plumbing, often have shared garbage, and shared natural gas resources. It's the duty of the apartment building owner (the computer running the docker service) to maintain the infrastructure, but each of the containers can do whatever they want in their own apartment.

    Also, since you're using it for a project, here's some helpful tips from the docker team: blog.docker.com/2019/07/intro-guide-to-dockerfile-best-practices/

    Edit: Here's a great explanation on containers vs. VMs - stackoverflow.com/a/16048358

  • Swampette
    Sept. 2, 2019, 5:15 p.m.

    Can confirm. Apartments are also like a lot like containers. In the sense that they are only suitable as dwellings in the most extreme and dire of circumstances.

  • Members 9 posts
    Sept. 4, 2019, 12:56 p.m.

    Here's a demo repo that starts with an example Go app and walks up through multiple-environment deployments of containers on Kuberentes in case it's useful for anyone: github.com/cloudnativedevops/demo

  • Members 46 posts
    Sept. 4, 2019, 11 p.m.

    Okay, so I wasn't aware that containers are a higher level term for that implementation as I have only ever heard them in reference to Docker. Also, yes the implementation isn'
    t exactly the same a a VM but all of it is to accomplish the same functionality as a VM which is what I was going for. I appreciate the links but I already did an online course talking much more in depth on both the implementation of docker images as well as the ideas behind it. They may be useful for someone else looking into this though.

  • Sept. 5, 2019, 7:40 a.m.

    I'd say another fundamental difference between VMs and containers is that VMs (since they have the overhead of the entire OS) are designed to be general purpose and allow you to run whatever you'd like, frequently multiple services alongside each other. Containers, as a general design principle, are intended to run exactly one service and only have the dependencies necessary for that specific service. In that way, you can spin up a VM that then runs the 4 (or however many) containers you need to run your application. The advantage of containers there is you don't have to care what VM your services are running in, because you've already defined that environment. This is, as I understand it, how Amazon ECS works - you set up some number of containers that you want all running on the same machine, and Amazon spins up a VM and launches the containers in it.

  • Members 46 posts
    Sept. 5, 2019, 2:06 p.m.

    I hope your reply is based off the fact that I made a typo, I meant isn't exactly the same. In a development environment a collection of containers accomplishes the same as a VM for isolating and saving a system and therefore are equivalent.

  • Sept. 5, 2019, 2:43 p.m.

    I didn't realize you had made a typo - and in that case I'm totally with you. For dev purposes, they're functionally equivalent. In fact, VMs can often be easier because they allow for quicker iteration (not having to rebuild and deploy containers for every change, etc.).

    Some of the differences I mentioned are subtle though, and they can often cause problems for those (like me) who are unaware of them. I've been burned by that myself in the past, particularly when trying to move an app from development into production!

  • Certified Good Posterâ„¢
    Sept. 13, 2019, 4:41 p.m.

    I'll pay your market rate to have one of you baby geniuses come and help our platform team install PHP modules into our containers. I wish I was joking.

  • Sept. 13, 2019, 4:47 p.m.

    Gonna pass on that one bud someone told me they smell and no one wants smelly containers