Fireship · @fireship

Learn Docker in 7 Easy Steps - Full Beginner's Tutorial

Uploaded August 24, 2020 · Length 11:02

Learn Docker in 7 Easy Steps - Full Beginner's Tutorial

Summary

This video teaches how to use Docker in 7 easy steps, covering installation, tooling, and advanced concepts like port forwarding and Docker Compose.

  • docker tutorial
  • docker for beginners
  • docker installation
  • docker tooling
  • docker compose
  • docker port forwarding

Transcript preview

The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.

  1. 0:00

    one of the leading causes of imposter

  2. 0:01

    syndrome among developers is not knowing

  3. 0:03

    docker it makes it hard to go to parties

  4. 0:05

    where everybody's talking about

  5. 0:06

    kubernetes

  6. 0:07

    swarms shuffle sharding while you hide

  7. 0:09

    in the corner googling what is a

  8. 0:10

    container we've all been there at one

  9. 0:12

    point or another

  10. 0:12

    in today's video you'll learn everything

  11. 0:14

    you need to know about docker to survive

  12. 0:16

    as a developer in 2020

  13. 0:17

    we'll take a hands-on approach by

  14. 0:19

    containerizing a node.js application

  15. 0:21

    i'll assume you've never touched a

  16. 0:22

    docker container before so we'll go

  17. 0:23

    through installation and tooling

  18. 0:25

    as well as the most important

  19. 0:26

    instructions in a dockerfile in addition

  20. 0:28

    we'll look at very important advanced

  21. 0:30

    concepts like port forwarding

  22. 0:31

    volumes and how to manage multiple

  23. 0:33

    containers with docker compose

  24. 0:35

    we'll do everything step by step so feel

  25. 0:37

    free to skip ahead with the chapters in

  26. 0:39

    the video description

  27. 0:40

    what is docker from a practical

  28. 0:42

    standpoint it's just a way to package

  29. 0:43

    software so it can run on any hardware

  30. 0:46

    now in order to understand how that

  31. 0:47

    process works there are three things

  32. 0:49

    that you absolutely must know

  33. 0:50

    docker files images and containers a

  34. 0:53

    docker file is a blueprint for building

  35. 0:55

    a docker image

  36. 0:56

    a docker image is a template for running

  37. 0:59

    docker containers

  38. 1:00

    a container is just a running process in

  39. 1:02

    our case we have a node application we

  40. 1:04

    need to have a server that's running the

  41. 1:05

    same version of node and that has also

  42. 1:07

    installed these dependencies

  43. 1:09

    it works on my machine but if someone

  44. 1:10

    else with a different machine tries to

  45. 1:12

    run it with a different version of node

  46. 1:13

    it might break

  47. 1:14

    the whole point of docker is to solve

  48. 1:16

    problems like this by reproducing

  49. 1:18

    environments the developer who creates

  50. 1:19

    the software can define the environment

  51. 1:21

    with a docker file

  52. 1:22

    then any developer at that point can use

  53. 1:24

    the docker file to rebuild the

  54. 1:26

    environment which is saved as an

  55. 1:27

    immutable snapshot known as an image

  56. 1:29

    images can be uploaded to the cloud in

  57. 1:31

    both public and private registries

  58. 1:33

    then any developer or server that wants

  59. 1:35

    to run that software

  60. 1:36

    can pull the image down to create a

  61. 1:38

    container which is just a running

  62. 1:40

    process of that image in other words one

  63. 1:42

    image file can be used to spawn the same

  64. 1:44

    process multiple times in multiple

  65. 1:46

    places

  66. 1:46

    and it's at that point where tools like

  67. 1:48

    kubernetes and swarm come into play

  68. 1:50

    to scale containers to an infinite

  69. 1:51

    workload the best way to really learn

  70. 1:53

    docker

  71. 1:54

    is to use it and to use it we need to

  72. 1:56

    install it if you're on mac or windows i

  73. 1:58

    would highly recommend installing the

  74. 1:59

    docker desktop application it installs