====== Docker the Tool of build-run-delivery ====== * Case study: when building pipeline, if everyone is on same team and on same page, it is easy to build one system for all, * use same configure tool to auto configure each user setting * use shared network drive to run same app * use centralized library to run all tools * bad situation: when there is more than 1 team working on more than 1 type of projects * when configure need to different to fit different team need * and when configure need to be switched when switching between projects due to nature of code dependency and nature of compability * not all languages is version back compatible * Python 2 and Python 3, Qt4 and Qt5 are already quite compatible in some way with some standard coding stlye to fit 2x2 combination * but in web development, some library change dramatically to improve efficiency and so are some game projects required some old assets to maintain. * so more and more situations happen in real life in a less standardized and diversed task-oriented world. * so Docker is the solution to let use pack versions of thing is a container to ship a all-in-one package like XAMPP (apache,sql,php ready to run pack), and much more than it (which allows multi-version run at same time) * disadvantage of container * duplicate of same things may happen in so many containers * sacrifice a bit of disk space for easy install and easy remove like portable app * ideal of "Run app in isolation" * easy to build a app and put on ipad and give to your client, since that is all in one (hardware and software) * to cut cost, you can put app in a virtual machine, that virtual machine is about the app (like cloud computing instance) * virtual machine is slow because each app is bring with a huge Operation System and hangs on memory and CPU all the time. * Container is a cheap lite pack "virtual machine" that use main operation system and run like a app wrapper - a app run inside a app. * finally, windows supports running Win+Linux container, linux support linux container, mac use VM to run linux container ====== Get Start with Docker ====== ref: https://www.youtube.com/watch?v=pTFZFxd4hOI * install : https://www.docker.com/products/docker-desktop/ (free for less than 250 people company) * once install and restart, run Docker Desktop with admin rights (important) * most likely, your "Docker Desktop starting" will take a bit time, then pop error about WSL 2 installation is incomplete * click the link to install latest linux core for windows. (wsl_update_x64.msi) * then restart pc, run docker with admin right again * you should see "Get started with Docker in a few steps", means ok * go through docker first tutorial to get started * you should be able to run cmd with admin rightdocker version