WSL 2 with Docker getting started

Поделиться
HTML-код
  • Опубликовано: 28 июн 2024
  • You can now run Docker on Windows easily with the Windows Subsystem for Linux 2 (WSL 2). Get started learning Docker and Linux! It's even supported on Windows 10 home version.
    WSL2 is part of Windows 10, version 2004 which was released in May 2020. Rather than using a translation or compatibility layer between Linux and Windows which was used in WSL 1, WSL 2 uses virtual machine technology to allow you to run a real Linux kernel directly on Windows 10. This also allows you to run Docker within Ubuntu running on Windows 10.
    Menu:
    Overview: 0:00
    Prerequisites: 0:27
    Download Docker Desktop for Windows: 2:39
    Install Docker Desktop for Windows: 3:08
    Start the Docker Desktop: 4:32
    WSL 2 Docker Desktop Settings: 5:37
    Run Docker Containers in Ubuntu in WSL 2: 7:21
    Testing Docker Containers: 9:44
    Previous video: • WSL 2: Getting started
    Good Links:
    Docker for WSL2: docs.docker.com/docker-for-wi...
    What is WSL? docs.microsoft.com/en-us/wind...
    WSL documentation: docs.microsoft.com/en-us/wind...
    WSL 2 Announcement: devblogs.microsoft.com/comman...
    WSL2
    Docker
    Ubuntu 20.04
    WSL 2
    WSL 1
    Ubuntu 18.04
    windows subsystem for linux
    #wsl2 #docker #windows
  • НаукаНаука

Комментарии • 258

  • @mzejli5242
    @mzejli5242 4 года назад +64

    it's like the movie inception lol.
    Thanks David!

    • @davidbombal
      @davidbombal  4 года назад +4

      lol... agreed... how many levels are we going :)

    • @mosesindecks
      @mosesindecks 3 года назад

      @@davidbombal lets do 30 levels.

    • @moltobene1528
      @moltobene1528 3 года назад

      recursion

    • @umeshdhaked7638
      @umeshdhaked7638 2 года назад

      btw you can't go further more than 3. Cause you cannot run another Ubuntu inside a Ubuntu container running on docker.

  • @midas087
    @midas087 4 года назад +16

    Amazing. I love it. A very educational tutorial as always David. How amazingly things you can do with today's technology and thanks for the knowledge sharing us usual. Cheers David

    • @davidbombal
      @davidbombal  4 года назад

      Thank you! Glad you enjoyed the video :)

  • @madhumithamuthukumar4094
    @madhumithamuthukumar4094 3 года назад +3

    This is what I was trying to understand for past 48 hrs... Thank you

  • @ntwiz2
    @ntwiz2 Год назад

    Just came across your channel David. You're method of explanation is absolutely unparalleled. I am a newb to the Linux world but my occupation requires I learn it. I look forward to see many more of your wonderful videos.

  • @sysux593593
    @sysux593593 Год назад +5

    Even 2 years after release, and still more useful than paid tutorials/Courses! Thanks, @david!

  • @michaelryce1200
    @michaelryce1200 8 месяцев назад

    Thank you for a very clear and concise explanation of the process from end to end. As somebody who is brand new to wsl2, docker and dev containers.....this was extremely straightforward.

  • @parthapramanik5330
    @parthapramanik5330 2 года назад

    Simply amazing. Thanks for such great content David!

  • @FORJAF02
    @FORJAF02 3 года назад

    Thank you. I was stuck for days until you showed that I needed to upgrade my windows version to with docker desktop.

  • @davidbombal
    @davidbombal  4 года назад +21

    Note: I made a mistake in the video at 2:12 - prerequisites for WSL2 are: "Windows Subsystem for Linux" and "Virtual Machine Platform"
    Menu:
    Overview: 0:00
    Prerequisites: 0:27
    Download Docker Desktop for Windows: 2:39
    Install Docker Desktop for Windows: 3:08
    Start the Docker Desktop: 4:32
    WSL 2 Docker Desktop Settings: 5:37
    Run Docker Containers in Ubuntu in WSL 2: 7:21
    Testing Docker Containers: 9:44
    Previous video: ruclips.net/video/_fntjriRe48/видео.html

    • @allendataguy
      @allendataguy 4 года назад +2

      "Virtual Machine Platform" & "Windows Subsystem for Linux" were the only two pre-requisites for Docker to be functional on Windows 10 Home.
      "Windows Hypervisor Platform" was never a requirement, as I understand from the documentation specific for Docker on WSL2.
      I am currently running Docker on my Windows 10 Home laptop without the "Windows Hypervisor Platform".
      Thanks for the tutorial video, I was looking for pitfalls leading to Docker to stop functioning & WSL shell working erratically.

    • @davidbombal
      @davidbombal  4 года назад +2

      That's correct. I made a mistake in this video :( In my previous video I explained this correctly.

    • @abelcotrinasaldana891
      @abelcotrinasaldana891 4 года назад

      So is it possible run other hypervisor like Vmware in the same pc with wsl?

    • @0MVR_0
      @0MVR_0 3 года назад

      @@davidbombal Had been troubleshooting for the past week because the particular setup seems to reject turning Hypervisor on.

  • @anag2125
    @anag2125 3 года назад +4

    "im running operating systems within operating systems within operating systems". Super cool :D Thank u so much!!

  • @biotikcharge3970
    @biotikcharge3970 4 года назад +29

    Running a OS inside a container inside a OS inside Windows (another OS)
    WTF lol. Love it. Thanks for this series David

    • @davidbombal
      @davidbombal  4 года назад +3

      lol... inception here we come :) Glad you enjoyed the video!

    • @swarupkumar2
      @swarupkumar2 3 года назад +2

      Not to forget he is recording all of these inside of a Mac.

  • @asa9593
    @asa9593 4 года назад +4

    Thanks for sharing, Uncle David!

  • @sarthakmathur7696
    @sarthakmathur7696 3 года назад

    Thanks David. The explanations were really clear!!

  • @AnjanKumarhere
    @AnjanKumarhere 3 года назад

    Not sure if its his flawless explanations or his backdrop or his voice, got me hooked.

  • @zero05vini
    @zero05vini 2 года назад

    Finally a good explanation of how to do this! Everything worked out well in my Windows 10 Home laptop, with a 19044 build.

  • @Chatsworth1979
    @Chatsworth1979 4 года назад

    Magnificent! Subscribed and liked! Worked exactly as you described on my Windows 10 Home computer. Much appreciated.

    • @davidbombal
      @davidbombal  4 года назад

      Thank you! Really happy to hear that it worked for you :)

  • @jamesdietsch7868
    @jamesdietsch7868 4 года назад +3

    Another great video here David! Superb content as always! Be interesting to see the new virtualization technologies from apple as well :)

    • @davidbombal
      @davidbombal  4 года назад +1

      Thank you James. Agreed - with Apple moving away from Intel CPUs, it's going to be interesting to see what happens :)

  • @priyankapatel9461
    @priyankapatel9461 3 года назад

    Thank you for making this video because of you I am able to run docker in ubuntu. Lot of thanks

  • @HudsonVentura
    @HudsonVentura 3 года назад

    Amazing. Very quick. Thanks so much!

  • @orleydoss3171
    @orleydoss3171 4 года назад +1

    That's neat... like having a bunch of Light weight hypervisors. Thank you Sir 👍

  • @suchitragiri4546
    @suchitragiri4546 3 года назад

    So informative, my all confusion has gone now!

  • @mrmuranga
    @mrmuranga 3 года назад

    Thanks David..very brief and clear

  • @akshayg8958
    @akshayg8958 3 года назад

    Thank David !! this was much needed ...

  • @TBoneXReaper
    @TBoneXReaper 9 месяцев назад

    Your video was very helpful. Thank you!

  • @nadeemahmed9963
    @nadeemahmed9963 4 года назад +1

    Very Nice, waited for 7 days to watch your youtube video.

  • @prasad_yt
    @prasad_yt 3 года назад +8

    Hi David, @ 2.13 in the video , you mention about selecting 'Windows Hypervisor Platform'. Should that have been "Virtual Machine Platform" ? I saw this video immediately after your WSL2 : Getting Started video.
    BTW - Thanks for making these videos - you make it easier to understand.

  • @livewithvikash
    @livewithvikash 3 года назад +1

    Hi David, you just saved my life. Even StackOverflow didn't help.

  • @ponsun
    @ponsun 3 года назад

    absolute madman running all these matroshka layers

  • @xx482
    @xx482 2 года назад

    Thanks a lot David . i was struggling for long time .. your video helped me ..

  • @autostopemniewiadomodokad8531
    @autostopemniewiadomodokad8531 2 года назад

    Great video! It helped me to run it. Hypervision was not chcked and it was previously not connecting with my wsl :) thank you

  • @msdevsec
    @msdevsec 2 месяца назад

    Thank you, extremely helpful!

  • @humayunakhtar2116
    @humayunakhtar2116 4 года назад +10

    thats what i was looking from you m gonna try now

    • @davidbombal
      @davidbombal  4 года назад +2

      Glad the video was helpful Humayun!

  • @NazmusSakibAbIR2011
    @NazmusSakibAbIR2011 3 года назад +1

    Your videos are very informative and well put together. Thank you for these amazing tutorials. Could you make a tutorial on how to use cuda enabled nvidia-docker2 containers within WSL2?

  • @dandogamer
    @dandogamer 4 года назад

    Nice! Wsl2 been waiting ages for it

    • @davidbombal
      @davidbombal  4 года назад

      Agreed. It's great to see how Microsoft are improving this.

  • @mosesindecks
    @mosesindecks 3 года назад +1

    @8:59 had me. I loved the running Ubuntu within Ubuntu within Docker within windows part lol. Inception Movie right there, time slowed down a bit.

  • @petrobull2560
    @petrobull2560 Год назад

    Great explanation video!👍

  • @WarMatt86
    @WarMatt86 3 года назад

    Great video and explanation are clear! It would be 110% awesome if you explain the "OS inception" with a whiteboard ;)

  • @r4id395
    @r4id395 2 года назад

    very good explanation! keep forward!

  • @amtawfiq
    @amtawfiq 3 года назад

    Thanks a lot for the thorough tutorial. I got a permission denied at 7:45 and used "sudo" to fix it:
    sudo docker run -d -p 80:80 docker/getting-started

  • @aHardReset
    @aHardReset 2 года назад

    Thank you so much. Great content.

  • @Arayankodesouth
    @Arayankodesouth 4 года назад +2

    thank you again..!
    My favourite channel in RUclips..!❤️💥

  • @aurkito
    @aurkito 4 года назад +2

    Love from India
    So much of thankful to you
    Your student
    Ayush

  • @kspm102
    @kspm102 3 года назад

    Thank you for sharing a useful tip. Btw, I suggest you go for native Docker on Linux (without hypervisior)

  • @muhammad.rafi2012
    @muhammad.rafi2012 4 года назад +2

    David you are so good ...please keep the good work up...also wold you mind making some more videos on docker with WSL2.. may be add kubernetes too :) if not asking too much

  • @guilhermeangelo3191
    @guilhermeangelo3191 3 года назад +2

    Great video! Could you show us how to increase the memory docker uses for WSL2? On Hyper-V Backend they have a menu for it

  • @biklimbs1133
    @biklimbs1133 2 года назад

    Amazing tutorial sir, it was really helpful

  • @tikshuv-ccna
    @tikshuv-ccna 4 года назад +1

    Great DAVid ! Thanks gonna try iy.

  • @tigerfanxiao
    @tigerfanxiao 3 года назад

    great video and very helpful as always

    • @davidbombal
      @davidbombal  3 года назад

      Thank you! Glad you think so!

  • @jxm8944
    @jxm8944 2 года назад

    Thank you for the WSL2+Docker. Running a OS inside a container inside a OS inside Windows (like as Russian nesting doll )? So amazing !

  • @traolin5877
    @traolin5877 4 года назад +10

    2:53 oh man, I hope I have enough storage space for that big boi

  • @mohitmotwani9256
    @mohitmotwani9256 10 месяцев назад

    Thank you so much david!

  • @jimzhang2562
    @jimzhang2562 2 года назад

    Thank you so much. Your video basically solved all my questions. So straightforward and easy to understand. You should go teach in Udemy and I will buy you course.

  • @nephets2878
    @nephets2878 4 года назад

    Good day from Jamaica, I would like to say thanks for the video. Until now I was unable to start any development using the limited hardware.

    • @davidbombal
      @davidbombal  4 года назад

      Glad to hear that the video was helpful

  • @user-cy3wg5ch5c
    @user-cy3wg5ch5c 3 года назад +3

    At 3:52 of video you said "Windows Home doesn't support Hyper-V", but why at 2:13 you said the Windows Hypervisor Platform is needed?

  • @dotnetdevni
    @dotnetdevni 10 дней назад

    U there first tutoral I looked that where a managed to get this to work under wsl very well explained

  • @patrickimoh
    @patrickimoh 4 года назад

    Thanks David... Good information.

  • @carlossellsoto
    @carlossellsoto 3 года назад

    Excellent video David. You got a new subscriber. I followed the steps but got stuck in the Resources section of Docker Desktop. It says "You don't have any WSL 2 distro". But I installed Ubuntu 20.04 checked it was WSL 2 with power shell and ran some sample commands. The only difference in the process is that I installed Docker in my normal user and have to run it as an administrator to make it work. Thank you in advance.

  • @shivankyadav8314
    @shivankyadav8314 3 года назад

    amazing video. just subscribed.

  • @scienceblossom6197
    @scienceblossom6197 4 года назад

    Thank you for the video.

  • @shaileshkumarshetty4401
    @shaileshkumarshetty4401 2 года назад +1

    This is my first comment on RUclips
    simply Awesome!!!!!!

  • @akunpang8625
    @akunpang8625 4 года назад

    Hey, David, really a great video! I hope your next video can introduce how to use nvidia-docker in WSL2. It would be really helpful for who need use Nvidia GPU in docker on Windows!

    • @davidbombal
      @davidbombal  4 года назад

      Thank you for the recommendation. Microsoft documentation: "Can I access the GPU in WSL 2? Are there plans to increase hardware support? In initial releases of WSL 2 hardware access support will be limited, e.g: you will be unable to access the GPU, serial or USB devices. However, adding better device support is high on our backlog, as this opens many more use cases for developers that wish to interact with these devices. In the meantime, you can always use WSL 1 which has serial port access. Please stay tuned to this blog and WSL team members on Twitter to stay informed about the latest features coming to insider builds and reach out to give us feedback on what devices you'd like to interact with!" docs.microsoft.com/en-us/windows/wsl/wsl2-faq

  • @zameerahmed1775
    @zameerahmed1775 Год назад

    Awesome ................ Ur voice reminds me of the Biblical David. U have been gifted with a fantastic voice ....... Its dominating and judgemental.
    I had an issue of running docker on WSL1. I have shed tears of blood doing all sorts of hacks.
    I have seen both ur videos ............ WSL2 installation & setting up docker on WSL2. U made it appear soooooooooooo simple
    Thr is another caveat in Windows Pro ............. The Virtualization needs to be enabled in Firmware(BIOS), else docker installation would hang on WinPro. I have faced it ..........
    Hyper-V Requirements:
    VM Monitor Mode Extensions: Yes
    Virtualization Enabled In Firmware: Yes
    Second Level Address Translation: Yes
    Data Execution Prevention Available: Yes
    Thanks a Ton David ................ God bless you , ur family & ur generations.

  • @michaelanderson7902
    @michaelanderson7902 4 года назад +1

    Thank you David

    • @davidbombal
      @davidbombal  4 года назад +1

      Thank you for watching Michael

  • @tomashuda8387
    @tomashuda8387 2 года назад

    Awesome video!

  • @renoel7476
    @renoel7476 3 года назад

    Great vid it helped me allot!

  • @alexisrs127
    @alexisrs127 3 года назад

    I could get what you said about the OS levels but a draw can also help a lot.

  • @OscarHRamirezIII
    @OscarHRamirezIII 3 года назад +2

    Fantastic video. Thank you for helping to make this whole process more understandable. I was wondering if you would are planning to make (or have already made) a video explaining how to allow docker containers running within WSL to access files in the host system? e.g. having an instance of Plex/emby/jellyfin access the files I have stored on a local external drive. I have a feeling it has something to do with volumes and/or bind mounts but I am still all too new to this to know how to proceed. I have played around and tried some things but have been unsuccessful. I’d love some guidance. Thanks for all you do. I’m gonna keep an eye on this channel. Keep up the great work.

  • @rogerpence
    @rogerpence 3 года назад +2

    Why, oh why, would anyone give this video a thumbs-down? David's videos on WSL are some of the best on RUclips. Great work. I tried WSL1 and did a little with it but after hearing about WSL2 I went back to my Linux box. Now, with WSL2 I am moving my docker containers from my Linux box to Windows--thanks to your help. Thank you, David.

    • @davidbombal
      @davidbombal  3 года назад

      Thanks Roger! Great feedback. Unfortunately haters will be haters :(

  • @marvelspecial8112
    @marvelspecial8112 4 года назад

    Thanks David, I also made it to my laptop. It would be very good if you can share some essentials or capabilities of this setup!

    • @marvelspecial8112
      @marvelspecial8112 4 года назад

      Maybe doing some labs on CCNP Encore! Currently, I am doing this certificate and struggling with ansible. I cannot run ansible playbook. If you can provide a lesson setting up ansible on this setup and run playbook, that would be awesome!
      Previously, i tried cloning ansible on Ubuntu (previous version) and tried to play it, there was no full support!

  • @EducationFactory
    @EducationFactory 4 года назад +1

    Greet Channel thanks David

  • @louisaldorio7251
    @louisaldorio7251 3 года назад

    thakyou sir , cant wait to try , i have been looking on how to installa docker in windows home but could not find , and finally u cover it, btw will it work on windows home single language?

  •  5 месяцев назад

    thanks ! it helped me

  • @skynet.yousha
    @skynet.yousha 4 года назад +1

    Nice video David, as usual.
    What is the difference between running "Windows Subsystem for Linux" natively on windows and through Docker Desktop?

    • @davidbombal
      @davidbombal  4 года назад +1

      You use the Docker Desktop app to enable Docker functionality with WSL 2.

  • @justarob0x
    @justarob0x 3 года назад

    so what are some use cases for this type of OS inception? besides testing, thanks!

  • @allezvenga7617
    @allezvenga7617 4 года назад

    Thanks for your sharing 👍

    • @davidbombal
      @davidbombal  4 года назад

      You're welcome. Thank you for watching!

  • @Gery-zg7ky
    @Gery-zg7ky 2 года назад

    thanks for the video

  • @ashique12009
    @ashique12009 2 года назад

    Thanks that works!

  • @BrewskaySA
    @BrewskaySA 3 года назад

    So your using Ubuntu to run Docker which is also running Ubuntu to use the Ubuntu Bash! Cool!

  • @DruchipLe
    @DruchipLe 3 года назад

    thank you very much

  • @Mr_Amazigh
    @Mr_Amazigh 3 года назад

    Thanks for this amazing walkthrough. This is literally running Linux virtual machine on windows , right ? . Currently , I have github project app build using docker. I’m planning to run that app using paid Linux AWS instance. By your tutorial , can I do it by using WLS 2 that I have set up recently on my windows 10 machine ?? Your help is highly appreciated 😇. If yes , is there any way to ssh and connect my existing local project from win to that virtual machine

  • @vivian20101991
    @vivian20101991 4 года назад +1

    Correction not windows hypervisor platform but virtual machine platform needs to be enabled in the windows feature

    • @davidbombal
      @davidbombal  4 года назад +2

      Good catch! I said that by mistake :(

  • @wailhayaly1851
    @wailhayaly1851 4 года назад

    That's awesome! but for local web dev, is using docker within VM slowing down the performance? I'm using docker to deploy php, nginx, mysql ...etc to launch Laravel app.
    What's your tips about using docker with the best performance for dev & production?
    Thanks David!

  • @Devopstour
    @Devopstour Год назад

    hello sir a lot of love from india 💌💌
    thanks for sharing such amazing content i realy loved it

  • @mrmotofy
    @mrmotofy 3 года назад

    Nice now I need an admin to keep track of my admin stuff

  • @sampatkumarkp1911
    @sampatkumarkp1911 3 года назад

    Hello David sir,
    I want to learn from beginning , for example you explaining about routers , config of routers , protocol and networking. I'm following CCNA 200-301 series of yours . Please tell me. Which playlist I have to follow. Thank you.

  • @WrongSmth
    @WrongSmth 4 года назад

    Hi, David! Sorry if you had mentioned it before.
    It seems that older versions of VMware and virtual box are incompatible with WSL 2.
    haven’t tested virtualbox yet but upgrading to
    VMware workstation 15.5.6 has fixed the issue.

    • @davidbombal
      @davidbombal  4 года назад

      There are issues running WSL 2 and VirtualBox or VMware - especially with nested virtualization. See here: docs.microsoft.com/en-us/windows/wsl/wsl2-faq and www.virtualbox.org/wiki/Changelog-6.0 and blogs.vmware.com/workstation/2020/01/vmware-workstation-tech-preview-20h1.html - I cover this here in my previous video: ruclips.net/video/_fntjriRe48/видео.html

  • @swethaasthoti2251
    @swethaasthoti2251 2 года назад

    Thank u so much 😍😍

  • @rsrini7
    @rsrini7 4 года назад

    Thanks. But virtual box not working after enabling internal hyperviser for wsl2. Any suggestions

  • @user-ho4zy2xr9t
    @user-ho4zy2xr9t 9 месяцев назад

    thank you

  • @Nx_Daniel_Official
    @Nx_Daniel_Official 2 года назад

    thanks man

  • @rescenic
    @rescenic 4 года назад +2

    thank you teacher

  • @HellSpawn3241
    @HellSpawn3241 4 года назад

    It would be great to hear how to solve WSL2 disk performance issues.
    If you can't install WSL2 and Docker without such "material", what are you going to do with Docker at all ?

  • @matthewfernando6197
    @matthewfernando6197 4 года назад

    Hi David, can you show us also how to add exisiting keys on WSL 2? Thanks

  • @kayvanshah994
    @kayvanshah994 3 года назад

    Can you make docker tutorial series?

  • @dimitristsoutsouras2712
    @dimitristsoutsouras2712 4 года назад

    all features needed from the turn on/off options in Win breaks Virtualbox (I dont mean running both at the same time but individually).

    • @davidbombal
      @davidbombal  4 года назад

      There are issues running WSL 2 and VirtualBox or VMware - especially with nested virtualization. See here: docs.microsoft.com/en-us/windows/wsl/wsl2-faq and www.virtualbox.org/wiki/Changelog-6.0 and blogs.vmware.com/workstation/2020/01/vmware-workstation-tech-preview-20h1.html - I cover this here in my previous video: ruclips.net/video/_fntjriRe48/видео.html

  • @cosmicdioxide
    @cosmicdioxide 3 года назад

    is version 20H2 higher than 2004 or not?
    Edit: Nevermind. It is. By the way, thank you David. Helps me a lot!

  • @mvl8209
    @mvl8209 3 года назад

    Do I understand it correct that die normal Linux VMs, the hypervisor is not needed, but door docker it is?
    Because in the previous video, you said we don't need the hypervisor.

  • @mujmoh7471
    @mujmoh7471 2 года назад

    thanks

  • @dudulofuu
    @dudulofuu 2 года назад

    bro you're the best!

  • @zezimadude13
    @zezimadude13 3 года назад

    Can this be done in Kali-Linux, David? Or is there some kind of issue? I keep getting issues no matter what I do. I also can't seem to find any videos or forums on it. I thought it'd be a good thing to containerize for security whilst doing pen-testing stuff.