Docker Container Tutorial - How to build a Docker Container & Image

preview_player
Показать описание
This tutorial covers how to build a docker container. It covers everything you need to know from setting up boot2docker on your machine to building and deploying your first Docker webapp.

Our goal for this video is to convert a static html site into a docker image that we, as a web developer, can run on any linux server with zero configuration - cause if there's one thing a web developer hates, it's configuration.

- 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.

- 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.

- 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

- Service Discovery:
Now that services have registered, we can discover them and load balance between them with a generic docker nginx container

- 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.

-~-~~-~~~-~~-~-
Also watch: "Responsive Design Tutorial - Tips for making web sites look great on any device"
-~-~~-~~~-~~-~-
Рекомендации по теме
Комментарии
Автор

Life is beautiful when you run linux on every system and compatibility is never a problem

TheBabiesGaming
Автор

Great work - Docker is truly a hidden gem once you know that you absolutely do need it. Thanks for the videos - will share.

tensevo
Автор

Latest versions of Docker for Mac don't need boot2docker :)

BennyPowers
Автор

This is awesome. I will be deploying my app with docker for sure.

boot-strapper
Автор

Thankyou! I've finally got a handle on the basics of docker thanks to these vids!

pbaumgarten
Автор

Very good explanation. I'm waiting for the next episode.

TheSkyMyLove
Автор

Awesome video, really liked it and it cleared my doubts. Nice work.

ShubhodeepMukherjee
Автор

what about for more complex stuff like database driven websites, how would we deploy that live?

raj
Автор

Hey! Thanks heaps for this! I write a lot of webapps using webpy for businesses and using docker makes my life a hell of a lot easier! I still rely on qemu/virtualbox for local development but for deployment, this is king shit!

JamesBos
Автор

Absolutely great work! thanks very much it helped building a good sound knowledge!

MamaliFeshFesh
Автор

Very cool video, hope you continue the series

NatHollings
Автор

Really cool tutorial..would be good to add a video with common troubleshooting for docker as well..or like best practise.

soucianceeqdamrashti
Автор

Great tutorial. Keep adding more videos on docker.
Thanks!

TrishnaGuha
Автор

Thank you good sir.
Awesome job. Very objective yet powerfull tutorial.

fillipefeitosa
Автор

some of the best tutorials I've seen... well done and thanks :)

carltaylor
Автор

Great tutorial! Thank you!
Could you please explain in some of your next tutorials how does Docker correlate with some other technics (Node.js cluster, nginx load balancing) that you've shown before?
Should we use cluster with docker?
Or in multi-server configuration, should we create 1 container with nginx and 1 with Node.js app, and then deploy nginx-container to 1 machine and app-container to 3 other machines?
Sorry for these questions, I've just watched all your Node.js-related videos in a row and now I'm confused what approach to use.
Thanks!

letalumil
Автор

Hey LearnCode.academy .. It is nice video and helpful too. I'm beginner in docker so can you just give the instruction for the windows user because i'm facing problems with nginx and docker too and i went through many videos on youtube. Most of the people are posting video for mac or linux os so it is request that can you post the above video for windows user or give above video instruction for windows user? Thank you.

MohitPujara
Автор

Thank you for sharing your time and knowledge with us. When will Video 4 be available ? Have a good one.

Osteele
Автор

Great Tutorial! But what about dynamic web applications (PHP with database) and what about Wordpress? What advice do you have for creating the container image for this type of situation? Do you recommend keeping wordpress/PHP and your MySQL database in their own containers?

jasonpanko
Автор

Great video. Question: when I push the deployment is it available publically for everyone to access?

akshaykadidal
visit shbcf.ru