Docker Tutorial – What is Docker & Docker Containers, Images, etc?



Docker tutorial for beginners - part 1:
Free Digital Ocean Credit! http://webdev.willstern.com/digitalocean
Docker is amazing, and it doesn't have to be difficult to understand. In these tutorials, I'll be breaking down exactly what a Docker container is and how to use it. I've found a lot of Docker container tutorials on the web, but I still hear from developers that it's hard to grasp exactly what Docker is and how to work with Docker images & containers.

In this video, I'll compare Docker to Vagrant and explain the differences, then in the next video, we'll do our first miniature deployment with Docker by creating a Digital Ocean machine with Docker installed and then running a Docker web server container on the machine. Later on, we'll get into docker machine, docker compose (fig) and a whole mess of other fun tooling.

Next up: how to run your first Docker web server - http://youtu.be/JBtWxj9l7zM

High-Availability Docker #1: https://youtu.be/wxUxtflalE4
- Cluster computing - CoreOS is our solution here. CoreOS allows us to make an expandable cluster of computers so we can add more computers should our application need more power to scale. CoreOS also allows us to run services on any machine in the cluster and they can all communicate with each other.

High-Availability Docker #2: https://youtu.be/top0MlcKSw4
- Scheduling: we shouldn't manually choose which app runs on which machine - this idea doesn't work at scale. Fleet will be our scheduler that decides where our apps/services run. If a CoreOS machine goes down, fleet will reschedule any services that it was running onto a new machine.

High-Availability Docker #3: https://youtu.be/1zJ8FfC-gmU
- Service Registration
Since we never know what ip address or port a service will be running on, we need to register that service so other services can find it and communicate with it. We'll use Etcd and Flannel for this

High-Availability Docker #4: https://youtu.be/R39VRocQtrQ
- Service Discovery:
Now that services have registered, we can discover them and load balance between them with a generic docker nginx container

High-Availability Docker #5: https://youtu.be/4215szNHlC4
- Public DNS: Once the app is working, we need a fixed way for the outside world to access it. We'll use Nginx and Confd for this. Confd will watch Etcd for service registration and when services come/go, it will build a new configuration file for Nginx and reload Nginx.

code source

  • Guys, but what Docker Container actually is? Can I think about it like a .NET CLR or Java JVM? I mean is it program that runs and creates virtual environment (maybe interprets?) for application inside the Docker image?

    View Comment
  • It's U-boon-too, there is no bun it it.

    View Comment
  • Thanks for video author!!!

    View Comment
  • It seems from your presentation that Docker replaces GIT in some ways. Is this the case?

    View Comment
  • Why would you use Docker on the production server over a native stack?

    View Comment
  • So with Docker the image is all you need for your app to work consistently everywhere. But what about the machines then? It seems you have a virtual machine on your Mac, a staging server and a production server. As far as I can see, the last two don't run any virtual machines. So do they have to have the same operating system and software as the VM on your Mac (except for the stuff that the image provides)? I'm still baffled.

    View Comment
  • Puppy Dog is App D

    View Comment
  • Hi sir, thank you very much for this good tutorial.
    Can you please tell the name of the software you used in your explanation (for the diagrams) ?
    Thank you.

    View Comment
  • Thanks will! Awesome video, I really love the graphics to explain the architecture. I created my own set to give a talk in my company.

    View Comment
  • So I've been looking for a good way to convert all my computers to linux, the problem being I am a gamer, and out of my 100 games only 30 are linux native and a good portion of the game I like to play won't work on wine (at least easily) can docker run applications from a completely different os on a machine or do they have to share a common kernel?

    View Comment
  • I'm at 5.56 minutes into the video and the Server/HostOS/DockerEngine/Containers abstract is being displayed and the person giving this presentation appears to be pointing at the Server (the black component at the bottom) and calling it a webserver, and that the HostOS is running on that.

    So, I'm having a bit of a chuckle because the whole video is clearly being presented by someone who spends a lot of time coding at the application level. The viewpoint is quite different from that of someone who spends a lot of time building infrastructure, especially as a Service to those who would use it as a Platform.

    Okay, so I'm an infrastructure guy and to me the black Server in the image is going to be either the physical or the virtual machine. This is the root container and into this is installed the OS.

    When the base OS is configured to how the organisation likes it, the Docker software is installed into the OS and this sets up a shim between the OS and any applications that are installed and configured on top of Docker.

    When software is installed and configured into Docker, Docker catches all of the hooks that normally go into the OS and pretends to be the OS. This is similar to how the virtual machine catches the OS and makes it think that it is running on physical hardware.

    So, if we call the virtual machine a Hardware Abstraction Layer (not technically correct language), we can call Docker an OS Abstraction Layer.

    Docker is most like a sandbox and calling it a container is really accurate. Docker presents a "clean" container and applications are specifically installed into that container.

    Another way to look at it is to think of Docker as being a shelf which is full of pots (the Docker containers) which are full of plants and soil (the applications).

    The roots of the plants (application hooks) are held by the containers, which makes the plants portable and they can be relocated to another Docker shelf running on top of another garden (OS) running on a different virtual machine.

    A regular application environment is planted directly into the OS (the garden bed) which means that the plant cannot be relocated to an entirely different garden bed. This is our standard approach to application installations.

    Docker is a great way of keeping your infrastructure cleaner, requiring less server rebuilds, and enabling the portability of your application environments.

    I wonder if it is possible to clone Docker Containers?

    View Comment
  • sure

    View Comment
  • This didn't demystify everything. Why would I want to run my program 4 times? What exactly is a container and why would I want multiple containers?

    View Comment
  • i'm sure this works really well in practice, but i'm having a hard time figuring out how close to reality this actually will be. say i have a webapp i built. joe schmoe signs up and starts using my site. he isn't gonna be running it on docker. so my performance i get when testing the container on docker is gonna be totally different from when its actually served up to joe in production, no?

    View Comment
  • can you tell me what tool you use to draw the diagram? I hate Visio but couldn't find a better one.

    View Comment
  • Instantly became subscriber. I need this docker tutorial. :)

    View Comment
  • I suppose the next logical step would be data containers and mounting volumes, followed by docker-compose and architecture of more complex container environments (doesn't need to be that complex, just MySQL, PHP-FPM, NGINX, WordPress)

    View Comment
  • This ended my googling! Thanks. Could you do a video on how developers can develop on docker images using their own native editor/IDEs etc

    View Comment
  • Puppy dog is Datadog.

    View Comment
  • Quay is pronouned key.

    View Comment
  • thnaks for your great video, could you please make a video about how to run multiple container application and access from outside/internet. forexample I have app1 and app2, each running in their own docker container, on a single vps and one single IP; and I have domain1.com and domain2.com which I would like to bind to app1 and app2 respectively. thanks in advance

    View Comment
  • Best Tutorial Hands Down. Thanks.

    View Comment
  • there was a time when i didn't understand a single word you said. Now I do. That's how nerdy I got. LOLs.

    View Comment
  • That puppy dog is datadog

    View Comment
  • good documentation thanks

    View Comment
  • That gotta be the best docker demystifying video online. Great work, I am now officially going to be using docker.

    View Comment
  • Very nice and short presentation. Thank you very much sharing it.
    I had a quick follow up question related to Docker Hub. Can I install/create a private Docker Hub (or any other container image repo for that matter) locally for internal team use?

    View Comment
  • Thumbs up for this epic explanation of the difference between Vagrant and Docker.

    View Comment
  • "I have no idea what this puppy dog is about" lol -_-

    View Comment
  • What's the name of the program you are using for the diagrams?

    View Comment
  • What did you use to make the dev ops illustrations?

    View Comment
  • Great presentation!. U stated ' Docker engine', it seems like the idea behind JVM which must exist on every machine for Java to run. So u pack ur app assumming that Docker engine is already installed correct?

    View Comment
  • thank you for no non sense video, i can really relate to this type of leaning methods !! thanks

    View Comment
  • I have ubuntu on my system, so I don't need VM, am I right?

    View Comment
  • So I develop my apps on Mac OS and usually deploy them to a Linux Distro. More often than not I run into issues due to the different OS'. I can see that using Vagrant will mitigate those issues. Will Docker also help with these issues or will I still have the same cross-operating-system problems?

    View Comment
  • so it's like a FreeBSD Jail with the exception that you can wrap it in an image file. is it?

    View Comment
  • That's some cool looking diagramming app, mind sharing what is it? 

    View Comment
  • The videos done by this speaker are consistently really high quality info and delivery.

    View Comment
  • What do you think of using Docker inside a Vagrant box for local development? I'm actually doing this now for a project, but not my doing or idea. Just learning about Docker and Vagrant. I essentially cloned the project git repo to my mac. Installed Vagrant and Virtual Box (thanks to your Vagrant tutorial!!). Ran "vagrant up" from the app root. After the complete setup, I "vagrant ssh" into the vagrant box (uses the debian/jessie64 vagrant box). The vagrant box contains docker and mysql. It also contains a docker container which hosts a rails app. Now I can run commands like docker build -t myapp/myappname . to do my app builds, etc. I can also take this same Vagrant box / git repo and do the same on another local machine for dev and testing purposes. Is this a good thing to do? Overkill? Basically its for us developers to mimic the same environment and have setup in no time.

    View Comment
  • FYI: That puppy dog is the logo for Datadog which is a cloud based monitoring service.

    View Comment
  • Hello, thanks for the video, what is the tool you used for the visual presentation? You seemed to switch to chrome so is it an extension? Thanks in advance! 

    View Comment
  • Perfect! i have to deploy to openshift this week and this course just came at the right time!

    View Comment
  • For the record, the purple puppy is Datadog.

    https://www.datadoghq.com/

    View Comment
  • Great vid!! Thanks for really simplified explanation!

    View Comment
  • No other resources online on getting started with Docker? Really?

    View Comment
  • Excellent overview.

    View Comment