Docker Tutorial for Beginners

แชร์
ฝัง

ความคิดเห็น • 121

  • @fancypants6062
    @fancypants6062 3 หลายเดือนก่อน +73

    James Murphy with the "just what I needed" video once again.

    • @mCoding
      @mCoding  3 หลายเดือนก่อน +8

      It's a skill!

    • @TheBusttheboss
      @TheBusttheboss 3 หลายเดือนก่อน +1

      its like he reads our minds

  • @davidriveros5422
    @davidriveros5422 3 หลายเดือนก่อน +44

    I've always wanted to learn docker but could never get myself to stick to it. Thank you, mCoding!

    • @mCoding
      @mCoding  3 หลายเดือนก่อน +5

      This is your sign! Don't put it off!

  • @sharksandbananas
    @sharksandbananas 3 หลายเดือนก่อน +39

    Not even the docker website could explain for me what it actually is. You've solved this mystery, thank you.

    • @mCoding
      @mCoding  3 หลายเดือนก่อน +5

      You're very welcome!

    • @mitchellrcohen
      @mitchellrcohen 29 วันที่ผ่านมา

      Agreed

  • @cthecheese1620
    @cthecheese1620 หลายเดือนก่อน +3

    Some notes now that I've finally finished this:
    - Docker Desktop is not required thanks to mCoding basically using it as a visual reference and sticking to CLI, you can just install the Docker Engine if you want
    - If you do install only Docker Engine, note that you will need to install Docker-Compose separately, and note that all commands will be "docker-compose" instead of "docker compose"
    - Although development is not the focus of the video, typing out everything will take longer but also gives you time to digest all the moving parts
    - Don't forget to import 'os' and from uuid import 'UUID' and 'uuid4' in the python code. In fact, always double check the imports as mCoding only mentions the vital packages
    Great video, I went from knowing of Docker as a concept to feeling confident enough to start incorporating it into my development work. I cannot express how nice it was to start using Compose after a succession of minor edits to files trying to fix errors.
    Thank you!

    • @mCoding
      @mCoding  หลายเดือนก่อน

      Thank you for sharing! Brings me joy to hear the vid was able to help you!

  • @markzuckerbread1865
    @markzuckerbread1865 3 หลายเดือนก่อน +3

    I use docker every now and then and I often forget key points in it that need to be revised or I need to onboard someone onto something that uses Docker, and seeing you upload this video gave me some sense of relief because I know it will be high quality, thanks!

  • @OrtinFargo
    @OrtinFargo 3 หลายเดือนก่อน +6

    I learnt docker last year but this video is good at checking up my knowledge from self learning docker, now it is all concise for future learner! will definitely send these to colleagues who need to learn this

    • @mCoding
      @mCoding  3 หลายเดือนก่อน +1

      Thanks so much!

  • @philosophiabme
    @philosophiabme 3 หลายเดือนก่อน +4

    I've been getting pretty comfortable with Docker the past few months, but this video was really what I needed to fill in the gaps! Love all your stuff.

  • @wrichik_basu
    @wrichik_basu 2 หลายเดือนก่อน +3

    The best Docker video I could find. Every essential topic for the novice, combined with some tips, and up-to-date material - what more can anyone ask for? Just loved it. Keep them coming!

    • @mCoding
      @mCoding  2 หลายเดือนก่อน +1

      Thanks! I appreciate it!

  • @gustavojuantorena
    @gustavojuantorena 3 หลายเดือนก่อน +11

    Awesome! And congratulations for the Docker sponsor, that talks a lot about the quality of your channel

    • @mCoding
      @mCoding  3 หลายเดือนก่อน +2

      Thanks a ton!

  • @re.liable
    @re.liable 3 หลายเดือนก่อน +3

    I've been watching Docker tutorials every now and then since last year (maybe even the year before that), but only now am I starting to dockerize my own applications haha. It's such a convenient tool.
    Right now with my limited understanding, I use compose for local development, and Dockerfiles for deployment

  • @AntonioZL
    @AntonioZL 3 หลายเดือนก่อน +12

    mCoding is back at it again with another banger that works better than official docs.

  • @cyberhard
    @cyberhard 3 หลายเดือนก่อน +7

    Excellent tutorial! One of the best I've seen in a while.

    • @mCoding
      @mCoding  3 หลายเดือนก่อน +1

      Thank you, hope it helps you in the future!

  • @kezif
    @kezif 3 หลายเดือนก่อน +4

    Finally i could add 10 years of docker experience by watching your video

  • @automatyk_
    @automatyk_ 2 หลายเดือนก่อน +2

    Thanks for that thorough run through. Subscribed.

  • @Jakub1989YTb
    @Jakub1989YTb 3 หลายเดือนก่อน +2

    This goes not only to my "useful dev" playlist, but also straight to my "TOP" playlist.
    Superb work :-)

    • @mCoding
      @mCoding  3 หลายเดือนก่อน +1

      Much appreciated!

  • @AngryArmadillo
    @AngryArmadillo 3 หลายเดือนก่อน +8

    A docker sponsorship… impressive!

    • @alexdin1565
      @alexdin1565 3 หลายเดือนก่อน +2

      because there are many competitors

  • @Corncycle
    @Corncycle 3 หลายเดือนก่อน +2

    really great resource, watched it through and will be referring back to this video in the future. thank you for the straightforward, motivated explanations!

  • @sumitvaise5452
    @sumitvaise5452 หลายเดือนก่อน

    I dont know why I find your videos very technically sound than others. thanks for your amazing video tutorials they all are top notch and deep.

  • @swolekhine
    @swolekhine 3 หลายเดือนก่อน +3

    I haven't even watched the video yet, but I know it'll be good. I needed to learn Docker soon for work, so thanks for this!

    • @mCoding
      @mCoding  3 หลายเดือนก่อน +1

      Haha hopefully it lives up to expectations!

  • @nlay42
    @nlay42 หลายเดือนก่อน

    I wanted to add my own response that this was a great video. I have commented on others messages. Thanks for creating the video!

  • @CulturedSkate77
    @CulturedSkate77 3 หลายเดือนก่อน +10

    Docker swarm or Kubernetes next please.

  • @darske1
    @darske1 3 หลายเดือนก่อน +2

    Great video!
    Answering to your demoscript: no, I didn't run it, I executed docker this way: docker run mcodingllc/demoscript:0.0.1 /bin/sh and then used cat to see the contents of run.sh, but good one lol

    • @darske1
      @darske1 3 หลายเดือนก่อน +1

      btw, you'll probably need to change the permissions to make it executable

  • @dmbrv
    @dmbrv 3 หลายเดือนก่อน +1

    Great video. Thanks. Can you make one on docker network? You explain very well.

  • @marlan__
    @marlan__ 3 หลายเดือนก่อน +11

    K8s/Helm video next? :D

  • @winypuh
    @winypuh 3 หลายเดือนก่อน

    Really nice and clear video, as usual! Your channel has been my goto to recommend to my colleagues to learn when they need to dive deep into Python topics (and now docker!) :) Thanks for all the content

  • @jj2006h
    @jj2006h 3 หลายเดือนก่อน

    Awesome comprehensive training
    Thank you very much

  • @Colaholiker
    @Colaholiker 3 หลายเดือนก่อน +1

    Excellent tutorial!
    I wish Docker could help me where I struggle with dependency and compatibility issues most, but I don't think it can.
    I am an embedded developer (so no support for Docker on our targets), but as such, you end up with various different tool chains and libraries on your computer, often causing compatibility issues or at least quite a headache until you got things configured to somehow cooperate. But with us working in a Windows environment (because our IT department doesn't know Linux🙄) and most of these tools being GUI based, I don't think that Docker could help containerizing things there.
    For us, it goes so far, that we started a project not too long ago using a 20 year old tool chain (which doesn't even support C99 or C++98 fully), because we can't install a newer version - that would break the old version which we still need to run to support older products. You just can't have both versions on one computer at the same time, it has even been confirmed by the tech support of the tool chain vendor.. (At least I found a way to use VS Code instead of their crappy editor and get things somewhat integrated, but it still sucks...) And of course we don't have the manpower to convert the legacy code to the new environment, which (of course) is not compatible in some finicky ways (let's just say that previous generations of programmers exploited erroneous behavior of this very compiler - so if a newer one does things right, have fun)...
    And of course being bound to Windows means that you can't just spin up separate VMs for everything either, as for each and every one of them you would have to get licensing straight.

  • @fungfung0315
    @fungfung0315 3 หลายเดือนก่อน +4

    love this topic

  • @VideoklipBG
    @VideoklipBG 3 หลายเดือนก่อน +1

    One problem I can't seem to find a solid answer to that has made it difficult using Docker is how do you modify the host's firewall without restarting the daemon?
    Most firewals use iptables under the hood and the Docker daemon creates its iptables chains and many virutal networks as needed, say for a docker-compose app with some ports exposed to the host. After changing firewall rules (e.g. for exposing a port on the host publicly) by doing `iptables flush` or `iptables-restore ` all networking configuration for Docker is gone and the entire service needs to be restarted with all currently running containers in order to regenerate it and have the networking work again.
    This is not acceptable as I often need to modify the firewall for development and testing purposes and have long-running applications as well without interruption. Some advice?

  • @pietraderdetective8953
    @pietraderdetective8953 หลายเดือนก่อน

    excellent video!
    why mongo for the DB though? would prefer sqlite or Turso as the DB to be honest!

  • @B_r_u_c_e
    @B_r_u_c_e 29 วันที่ผ่านมา

    Very good. Thank you.

  • @re.liable
    @re.liable 3 หลายเดือนก่อน +2

    I think a demo of bind mounts would've been nice, e.g. for automatically restarting the Python API on code changes. Maybe it is out of scope.

  • @polares8187
    @polares8187 3 หลายเดือนก่อน

    Great video, thanks so much

  • @quintencabo
    @quintencabo 3 หลายเดือนก่อน

    Congrats on the sponsor that's cool

  • @alexanderpetrovski1393
    @alexanderpetrovski1393 2 หลายเดือนก่อน

    I just thought that Docker would provide the isolation to begin with. I did the .venv and it seems to work fine. Then I nested containers without .venv which made it slimmer in terms of resources it’s using. But the same effect as far as I can tell. I imagine in production you’d want that generally speaking.

  • @Neuroszima
    @Neuroszima 3 หลายเดือนก่อน

    I didnt ask for this but this is realllly welcome!

  • @lordareello8221
    @lordareello8221 2 หลายเดือนก่อน

    THE docker tutorial!!

  • @alexanderpetrovski1393
    @alexanderpetrovski1393 2 หลายเดือนก่อน

    Nice video! One thing though, why would you use a .venv inside along with docker containers? Thanks.

    • @mCoding
      @mCoding  2 หลายเดือนก่อน

      Thanks! In theory, you use a venv in a docker container for the same reason you use one on the host. Outside a venv, python is your system python, and critical programs required for your operating system to function might depend on the packages already installed. You installing new ones or upgrading them might therefore break your system (inside the container). In practice, I have not had an issue with this even once and I haven't seen anyone use a venv inside docker in production. But in theory, it could be a problem.

  • @abdullahajmal5608
    @abdullahajmal5608 3 หลายเดือนก่อน +2

    Kubernetes next please : )

  • @modernkangal
    @modernkangal 3 หลายเดือนก่อน

    Damn I have quite the road ahead of me moving from remote support to get to cloud architect
    Would love to hear some input on what I'll have to master to get there. I'm 22 years old

  • @yash1152
    @yash1152 3 หลายเดือนก่อน

    6:23 docker run hello-world
    awesome output. niiiice

  • @quintencabo
    @quintencabo 3 หลายเดือนก่อน

    Perfect timing

  • @sinanerbezci3699
    @sinanerbezci3699 3 หลายเดือนก่อน

    Amazing video, packed with info. Thank you.
    Also can you share the requirements.txt that you showed at 29:28?

    • @mCoding
      @mCoding  3 หลายเดือนก่อน +1

      Will upload later but you can generate for yourself with pip install fastapi motor then pip freeze

    • @Brianwiz
      @Brianwiz 3 หลายเดือนก่อน

      when I generate it myself it is much shorter, only containing 10 or so requirements

  • @anon_y_mousse
    @anon_y_mousse 3 หลายเดือนก่อน +2

    Random question just to help with engagement, but have you played with Python 3.14 at all?

    • @mCoding
      @mCoding  3 หลายเดือนก่อน +2

      Too far away, I'm looking out closely for 3.13 though!

  • @robtea3941
    @robtea3941 2 หลายเดือนก่อน +1

    had to add pip install uvicorn to get the backend fastapi bit working

  • @Cjkhaled
    @Cjkhaled หลายเดือนก่อน

    If you are using virtualbox and this isn't working for you because of kvm, shut down your virtual machine and go to settings > system > processor and check Enable Nested AMD

  • @sitrakamatthieu
    @sitrakamatthieu 3 หลายเดือนก่อน +1

    HE IS BACK ?????

    • @mCoding
      @mCoding  3 หลายเดือนก่อน +1

      Never left! This vid just took a long time to make :)

    • @aerioplux
      @aerioplux 3 หลายเดือนก่อน

      @@mCoding that I believe without a doubt. That’s very dense material. Chapeau’s 👍🏻

  • @alexdin1565
    @alexdin1565 3 หลายเดือนก่อน +7

    please can you make video about deployment?

    • @mCoding
      @mCoding  3 หลายเดือนก่อน +4

      Can do if there's enough interest!

    • @alexdin1565
      @alexdin1565 3 หลายเดือนก่อน +3

      @@mCoding yes please because all youtubers don't cover this topic

    • @nlay42
      @nlay42 หลายเดือนก่อน

      Yes, I would find this helpful!

  • @isodoubIet
    @isodoubIet 3 หลายเดือนก่อน +8

    Docker? I don't even know her!

  • @JamesTJoseph
    @JamesTJoseph 3 หลายเดือนก่อน +3

    I use devcontainers at work.

  • @chrisherz5517
    @chrisherz5517 7 วันที่ผ่านมา

    Why would I be getting only 10 requirements when running 'pip freeze > requirements.txt'? I'm using Python 3.12 as the venv and I had to manually add uvicorn to requirements.txt. Thanks!

  • @黃先生-d7o
    @黃先生-d7o 3 หลายเดือนก่อน +1

    Good~

  • @Irakkli
    @Irakkli 3 หลายเดือนก่อน

    Thanks

  • @Gadetto
    @Gadetto 2 หลายเดือนก่อน

    great

  • @CollinHeist20
    @CollinHeist20 3 หลายเดือนก่อน

    Quick question - at 35:55, why copy and install the wheels instead of installing "normally" in the builder and then just copying the python site-packages directory?

    • @mCoding
      @mCoding  3 หลายเดือนก่อน

      Hmm I think either one should work fine. In general if you had build dependencies they would be in your site packages too so you would want to start fresh and install wheels to avoid copying build deps. In this case we didnt have any so I don't see any reason copying the site packages wouldnt work too.

  • @Marspaw-1
    @Marspaw-1 2 หลายเดือนก่อน

    Great and informative content, but the pace was a bit fast when running commands. Had to set the speed to .75 to keep up 😅
    Still a really good and helpful video though!

  • @gautam-narula
    @gautam-narula 3 หลายเดือนก่อน +1

    Kubernetes next!

  • @VerifyBot
    @VerifyBot 3 หลายเดือนก่อน +1

    What's the solution for having to write similar/same details in each .env file?

    • @mCoding
      @mCoding  3 หลายเดือนก่อน +1

      Secrets managers (mentioned but not explored in video) can help with this by allowing your instances to pull all their secrets at runtime.

  • @samaelmorningstar8737
    @samaelmorningstar8737 3 หลายเดือนก่อน +1

    Can u make kubernetes in 1 hour if possible please

  • @mrcorbak6793
    @mrcorbak6793 หลายเดือนก่อน

    Holy shit that was good

  • @enestaylan636
    @enestaylan636 3 หลายเดือนก่อน +1

    can't find the source code, can you please share it?

  • @mediachapdelaine
    @mediachapdelaine 3 หลายเดือนก่อน +2

    Thanks. but this is not for beginners.. You got me started fine and then shortly later, I was lost.. I will keep my nose to the grindstone though.

    • @Michallote
      @Michallote หลายเดือนก่อน

      When and where were you lost? You really don't need prior knowledge to follow just pause copy the code and try yourself

  • @gaborm4767
    @gaborm4767 หลายเดือนก่อน

    What is that error at 5:56?

  • @sale7680
    @sale7680 2 หลายเดือนก่อน

  • @nufh
    @nufh 2 หลายเดือนก่อน

    Tried to install Docker Desktop inside Ubuntu, but I can't run it.

    • @mCoding
      @mCoding  2 หลายเดือนก่อน

      Check the prerequisites carefully! Not all versions of Ubuntu are supported!

  • @abraham_o
    @abraham_o 3 หลายเดือนก่อน +1

    🌹

  • @JP-HoneyBadger-Designs
    @JP-HoneyBadger-Designs 26 วันที่ผ่านมา

    apturl==0.5.2 where is this coming from, it will never build. Commited it out in requirements.txt and added RUN apt-get update && apt-get install -y apturl with the same results.

  • @joeseabreeze
    @joeseabreeze 2 หลายเดือนก่อน +1

    incredibly complicated 😅

  • @Jakub1989YTb
    @Jakub1989YTb 3 หลายเดือนก่อน +1

    Well.. the volume files can still be found inside docker. They're not encrypted od compressed. It's just not convenient. So the point still stands.

    • @mCoding
      @mCoding  3 หลายเดือนก่อน +2

      If you are using Docker Engine directly with local volumes, then you can find them as just a plain directory somewhere. With Docker Desktop it becomes slightly more obfuscated because the volumes live within the Docker Desktop VM for performance reasons. If you are using other volume types besides local, like an efs volume, then it becomes increasingly more inconvenient to work with them outside containers!

  • @Jojo_clowning
    @Jojo_clowning 3 หลายเดือนก่อน +4

    Kubernetes when ?

  • @paraschavan014
    @paraschavan014 3 หลายเดือนก่อน +2

    I have Install Docker on separate local disk D using this command
    start /w "" "Docker Desktop Installer.exe" install -accept-license --installation-dir="D:\Docker\Docker" --wsl-default-data-root="D:\Docker\wsl" --windows-containers-default-data-root="D:\\Docker"
    But I am still facing storage issues in the local disk C.
    Does anyone know how to solve this issue

  • @Eisesser01
    @Eisesser01 3 หลายเดือนก่อน +1

    And what’s the difference to the other hundreds of Docker videos on TH-cam?

    • @mCoding
      @mCoding  3 หลายเดือนก่อน +3

      This one is made by me :)

    • @Jakub1989YTb
      @Jakub1989YTb 3 หลายเดือนก่อน +2

      @@Eisesser01 Watch it and it will become apparent. This content is at a whole different level.

    • @nlay42
      @nlay42 หลายเดือนก่อน +1

      I have watch several videos and this one explained and filled in many of my newbie questions. I have gained so much more from this video.

  • @heamanthkumar-m4e
    @heamanthkumar-m4e 12 วันที่ผ่านมา

    this video is not preferred for beginners

  • @aaabbb-gu5pz
    @aaabbb-gu5pz 3 หลายเดือนก่อน +4

    My "software" is two simple rows, to install I must learn 5 new super complex languages to write on them and install several systems bigger than my own computer?! Never use make files, never use linters, never use tests, never docker, no absurd buggy corporative linux insanity (terminal based) flood bloat or js chaotic insane "frameworks", never!!!

    • @FederalPandas
      @FederalPandas 3 หลายเดือนก่อน +4

      This must be a troll comment, or OP is a teenager.
      It's fine to think that docker is over engineered; but to suggest that tests, linters and even makefiles are bloat is pure amateurism.

  • @aaabbb-gu5pz
    @aaabbb-gu5pz 3 หลายเดือนก่อน +4

    How important and enormous must be my application, to suggest myself and my clients the whole big system - several GB to run my... my 100 rows code?! Because of this I don't use node, react, electron, python environments, almost all js technologies, etc., all wants for each "hello word" project to install hundreds MB again and again. If SSD become 100TB for 1$ reliable for 30 years, I will change my mind 🤣

    • @kezif
      @kezif 3 หลายเดือนก่อน +2

      you dont really need docker, environments and other ci/cd stuff for small hobby projects. But if you are building critical application ability to scale it at please and run it in isolated environment could save man hours

    • @mCoding
      @mCoding  3 หลายเดือนก่อน +5

      Docker is a tool that was developed to solve problems that arose in real world applications, typically with large scale deployments and complex systems. As you can sense for yourself, Docker is not a one size fits all solution for all situations. It's perfectly possible that Docker isn't the right tool for your current project, and that's okay. Only you know what's best for your projects, so trust your instincts!

    • @mCoding
      @mCoding  3 หลายเดือนก่อน +1

      Docker is a tool that was developed to solve problems that arose in real world applications, typically with large scale deployments and complex systems. As you can sense for yourself, Docker is not a one size fits all solution for all situations. It's perfectly possible that Docker isn't the right tool for your current project, and that's okay. Only you know what's best for your projects, so trust your instincts!

  • @aaabbb-gu5pz
    @aaabbb-gu5pz 3 หลายเดือนก่อน +2

    For each tiny part of software, take new different computer with full system installed haha 🤣🤦🏻
    This only linux user can invent 🤣, but Windows tradesmen likes this 😱

    • @kezif
      @kezif 3 หลายเดือนก่อน +1

      I mean its look sane when you need isolated system

  • @ChandanSomani
    @ChandanSomani 25 วันที่ผ่านมา

    This is the best Docker Tutorial for Beginners, but If same is using MERN Stack / C#.WebAPI, FE/BE would be great

  • @devbhai9333
    @devbhai9333 3 หลายเดือนก่อน

    As windows user, it's difficult for me to follow every instructions. Please make a new video using windows command prompt. 🙏🏼

  • @EkShunya
    @EkShunya 3 หลายเดือนก่อน +2

    can i say phenomenal - short and crisp🫡

    • @mCoding
      @mCoding  3 หลายเดือนก่อน

      Thank you, I appreciate the support!

    • @EkShunya
      @EkShunya 3 หลายเดือนก่อน

      @@mCoding do you stream ?

    • @nlay42
      @nlay42 หลายเดือนก่อน

      I agree! I am very new to docker and this video filled in so many gaps and questions on steps that I failed to grasp from other TH-camrs. I believe I now have an understanding that will cause me to rewatch prior youtubers that offer different content.