Coder Social home page Coder Social logo

Docker tutorials? about start-here HOT 12 CLOSED

dwyl avatar dwyl commented on May 23, 2024
Docker tutorials?

from start-here.

Comments (12)

nelsonic avatar nelsonic commented on May 23, 2024

@fmoliveira we would love to use Docker ... see: https://github.com/dwyl/learn-docker
But... for _development_, Vagrant has proved easier on Mac...

What OS are you using?

from start-here.

fmoliveira avatar fmoliveira commented on May 23, 2024

@nelsonic Oh, I see! I wasn't aware of that repo, thanks for the link!

I use Linux and Windows. At home I use Linux all the time. At my job I use Windows all the time and I've been running Docker with Boot2Docker. Though Boot2Docker is now deprecated, they've created a new project called Docker Machine, but I haven't tested it yet. I guess setting up Vagrant could be easier indeed because it doesn't need any other layer atop of it, as Docker needs Docker Machine.

I haven't tried using Docker on Mac. What were the downsides you've faced?

from start-here.

nelsonic avatar nelsonic commented on May 23, 2024

On a Mac, you are running a Docker on top of VirtualBox. My issue was exposing the TCP ports...

from start-here.

fmoliveira avatar fmoliveira commented on May 23, 2024

Oh, right. My use cases for Docker at my job are different than at home, I'm using it to cross compile for ARM Linux in Windows, so, I didn't need exposing any ports. That's why I didn't came across the same issue as you did.

I think the TCP ports are exposed to the VM IP address, so you need to find out its IP address and use that. I don't know how do to that with Docker Machine, but I'll setup it tomorrow to play around.

from start-here.

fmoliveira avatar fmoliveira commented on May 23, 2024

Port forwarding can be done through VirtualBox VM settings. This will expose ports from the VM to your host OS.

VM > Settings > Network > Port Forwarding

It's also necessary to expose your container port when running it. This will expose the container port to the host port, which, in this case, is the Docker VM:

docker run -p 9200:9200 -d elasticsearch

It's not too straightforward as Vagrant anyway. 😞

from start-here.

howardroark avatar howardroark commented on May 23, 2024

Docker itself is not really virtualization and requires a Linux kernel to run. It is a clever way to create a system sandbox around a running Linux kernel, part of the reason it is so fast and efficient. The core idea behind it is that it allows you to run your application parts as separate systems within the same system without burdening it. The idea being that you run your web service and db service as two sandboxes from the get go so you are forced to configure it that way. Then if you ever need to scale you don't need to change much.

Because OSX runs the BSD kernel you still need to use virtualization to run it. I think Boot2Docker used Vagrant to load a lightweight Linux system that allowed Docker to run.

While Docker certainly is "quick to boot", it is not super simple to get running with on all systems. In my view Vagrant is best for development because of how much "automatic" configuration it enables. Out of the box it supports every "provisioner" and you don't really need to find the perfect box... you can just configure it to your liking. With Docker you tend to need to find the perfect configuration before you start.

This project does look very promising though.... https://kitematic.com/

from start-here.

nelsonic avatar nelsonic commented on May 23, 2024

@howardroark agreed, kitematic looks great. I just haven't had (made) time to use it.
(mostly because Vagrant serves my needs quite well ...)
But ultimately we need a _beginner-friendly_ way of running our app(s) and if we can use Docker for that, I'm 100% in favour of switching from Vagrant.

from start-here.

fmoliveira avatar fmoliveira commented on May 23, 2024

Thanks a lot for your thoughts @howardroark ! They are indeed very useful for explaining why Vagrant is easier for development.

Now I see why Vagrant has proved to be easier for development. :)

So, I think there's no reason to add Docker instructions to @dwyl and @docdis for now. Vagrant is more beginner-friendly at the moment, as @nelsonic mentioned. Hopefully Kitematic will change that, it looks really awesome!

from start-here.

howardroark avatar howardroark commented on May 23, 2024

Yeah, at this point having your whole team able to just run vagrant up makes it the best choice in my view.

from start-here.

fmoliveira avatar fmoliveira commented on May 23, 2024

Sure! Thanks a lot @nelsonic and @howardroark for the clarifications!

Closing. 😃

from start-here.

nelsonic avatar nelsonic commented on May 23, 2024

@fmoliveira if we can get Docker working as easy as Vagrant, we'll switch in a Flash.
Docker has way more hype (due to their VC Funding paying for a PR person...)
And as such will be far more recognisable to people. So if you have time to contribute to the https://github.com/dwyl/learn-docker tutorial, we'd be massively grateful! 👍

from start-here.

fmoliveira avatar fmoliveira commented on May 23, 2024

Fine @nelsonic ! I'll do that! 😃

from start-here.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.