Intro to Docker [with Java Examples]

Sdílet
Vložit
  • čas přidán 2. 06. 2024
  • An introduction to @DockerInc covering the most important concepts you need to understand to start using Docker. I'll be using a java application for my examples but the same basic concepts apply for any technology you're using for your applications.
    Install Docker: docs.docker.com/get-docker/
    Github Repo: github.com/daliasheasha/Hello...
    Watch Intro to Docker PART 2 on Networking, Docker Compose: • Intro to Docker - Part...
    Docker in IntelliJ IDEA: • Docker in IntelliJ IDEA
    Download IntelliJ IDEA: jb.gg/tgrb3m
    00:00​ - Introduction
    00:22 - The Problem (Why Docker?)
    03:29​ - What is a container?
    04:49 - The Solution (Why Docker?)
    05:47 - Virtual Machines vs Containers
    07:30 - How do I Containerize my Application?
    08:44 - [Demo] Create a Hello World Application
    09:26 - [Demo] Step 1: Install Docker
    10:07 - [Demo] Step 2: Build a Docker Image
    16:31 - [Demo] Step 3: Run a Docker Container
    Author: Dalia Abo Sheasha ( / daliashea )
    Categories:#IntelliJIDEA #Docker #DockerHub
  • Věda a technologie

Komentáře • 144

  • @tjohnsonabraham
    @tjohnsonabraham Před 3 lety +44

    I never quite understood Docker until I watched this video. Dalia managed to do the impossible in less than 4 minutes. This is top quality content.

  • @sumitpatnaik7057
    @sumitpatnaik7057 Před 3 lety +85

    Jet brains should start education channel for such great content

    • @JetBrainsTV
      @JetBrainsTV  Před 3 lety +7

      Thank you! Which other types of content would you envision on such a channel?

    • @sumitpatnaik7057
      @sumitpatnaik7057 Před 3 lety +7

      @@JetBrainsTV project based content would be great

    • @superstargazer923
      @superstargazer923 Před 3 lety +3

      @@JetBrainsTV I would love having a app development video with jetbrain editor

    • @moofymoo
      @moofymoo Před 3 lety +2

      I'm thinking more of replacing existing education system with JetBrains one. They can start with my country's education system anytime, because selling out to Microsoft didn't work so well.

    • @njgarg
      @njgarg Před 2 lety

      @@JetBrainsTV A project based on Spring Boot, Kafka, Actuators, Spring Data JPA, REST APIs.

  • @levinie5081
    @levinie5081 Před 3 lety +36

    even better than docker official tutorial. thank you

  • @alexpadula7859
    @alexpadula7859 Před 2 lety +4

    Years I avoided Docker, now I'm obsessed, thank you.

  • @MariosMartiopoulos
    @MariosMartiopoulos Před 2 lety +5

    I never watch videos in English, but I can listen to Dalia for hours. Please give us more videos with her.

  • @superstargazer923
    @superstargazer923 Před 3 lety +15

    Great edu video. I wish jet brains offer a special edu CZcams channel and courses. Just a suggestion

  • @skverskk
    @skverskk Před 2 lety +7

    Positively one of the best introductory tutorials on Docker out there on CZcams.

  • @hyperborean72
    @hyperborean72 Před rokem +8

    The quality of the video, the design of the graphics, crystal clear explanation right to the point, and even soft background music make this video outstanding. Thank you

  • @OmoruyiOmofonmwan
    @OmoruyiOmofonmwan Před 2 lety +2

    Jesus thank you so much. This is the best video yet about Docker.

  • @azatburkhanov1397
    @azatburkhanov1397 Před 2 lety +4

    Best explanation of Docker Intro concepts I've even seen on web

  • @manee427
    @manee427 Před 2 lety +2

    The bset explanation about docker image creation. Perfect

  • @dimitriosmenounos1009
    @dimitriosmenounos1009 Před 3 lety +6

    Nice presentation. I want to add at 5:50 VMs don't suffer only from having to duplicate an OS but also from having to emulate hardware components to the virtual environment. That makes them both heavy and slow.

  • @yogeshmujumdar
    @yogeshmujumdar Před 2 lety +1

    Loved the way you speak. Crisp, slow and with full attention. Even a kindergarten student will be able to follow! Thanks!

  • @himaniamit
    @himaniamit Před 3 lety +6

    Amazing way to explain Docker. Thanks for sharing it

  • @danmarian3606
    @danmarian3606 Před 2 lety +1

    One of the best videos on Docker... Thanks

  • @SosetaFurioasaJr
    @SosetaFurioasaJr Před 2 lety +2

    Dalia, thank you for a great introductory video! It helped me familiarize with Docker technology. Thumbs up!

  • @stoychostankov886
    @stoychostankov886 Před 2 lety +2

    The best explanation. Thank you

  • @GakisStylianos
    @GakisStylianos Před 3 lety +1

    Very straightforward. Good job!

  • @user-fy8vj7el5q
    @user-fy8vj7el5q Před 2 lety +1

    Amazing video, Dalia!
    Thank you so much

  • @raphaelreitzig5984
    @raphaelreitzig5984 Před 3 lety +7

    There's lots of follow-up stuff to ingest before going productive, of course -- but this _is_ a great introduction for the uninitiated! Kudos!

    • @raphaelreitzig5984
      @raphaelreitzig5984 Před 3 lety +1

      @Dalia Abo Sheasha I was more thinking along the lines of how to actually create a good image (not with Dockerfile, IMHO); how to configure the Java application through container interfaces; changed assumptions, e.g. short-running small service vs long-running monolith, and consequences; health checks resp. liveness/readiness probes and good practices for them; delegating cross-cutting concerns, e.g. to service mesh; and so on.
      In short, there's many things you have to rethink when deploying a container image to, say, a Kubernetes cluster, as opposed to running a WAR in an application server. Just bundling your old application in a Dockerfile is, arguably, not even a good start. :'D
      That doesn't take away anything from your video, of course: as I said, it is a good, approachable intro into the "why" of containers, which is often lost in more technical contributions about "how".

  • @codeispoetry
    @codeispoetry Před 3 lety +3

    Awesome explanation. Thank you.

  • @tradewithtony
    @tradewithtony Před 2 lety +2

    I am seeing this at the right time, this is so far so good very informative and timing is perfect covers all

  • @chessmaster856
    @chessmaster856 Před 2 lety +1

    Very good video from Java perspective.

  • @pahan35skype
    @pahan35skype Před 2 lety +7

    Great video and material quality. This kind of format works even better than just a tutorial from Docker. And big thanks for showing us how to use Docker features from IDE.
    P.S: and it's easy to consume a material at 2x. Thanks to Dalia for the great pronunciation!

  • @rahul-java-dev
    @rahul-java-dev Před 2 lety +2

    Very very helpful....Thanks a lot ma'am.

  • @kumo860
    @kumo860 Před 2 lety +1

    This was incredibly helpful! Thank you!

  • @kenduraghav
    @kenduraghav Před 2 lety +2

    Great content for the beginners who wanted to learn docker

  • @ranjithkumarr5981
    @ranjithkumarr5981 Před 2 lety +2

    Noble work. Many thanks

  • @VinayakKarigar
    @VinayakKarigar Před 3 lety +1

    Very informative. Thank you so much 🙏🙏

  • @codegeek8256
    @codegeek8256 Před 2 lety +3

    This is useful as currently, we do not have tutorials that clearly explain Java with Docker. Keep it up. However, we would like Tutorials that are more hands-on from your side than you explaining and the code writing itself on the left. None the less thanks so much.

  • @luciorogeriobotelho3032
    @luciorogeriobotelho3032 Před 9 měsíci

    Great presentation. Described the important points using a simple and complete example

  • @mostafahashemi9073
    @mostafahashemi9073 Před 3 lety +2

    Great explanation 👍
    Thank you .

  • @ahmedabouemira1713
    @ahmedabouemira1713 Před 2 lety +1

    Thank you dalia for this great explain! this really was helpful !!

  • @shaktisingh-lu3dm
    @shaktisingh-lu3dm Před 3 lety +1

    Very nice n helpful video for beginners.

  • @mariancaikovski8638
    @mariancaikovski8638 Před 2 lety +1

    A well-illustrated talk to the point.

  • @sureshbhat1891
    @sureshbhat1891 Před 3 lety +2

    Great video and awesome job Dalia!!

  • @gunaseelanselvam2374
    @gunaseelanselvam2374 Před 2 lety +1

    Thank you, this video is helpful to start learning docker

  • @KonstantinKuda
    @KonstantinKuda Před 2 lety +1

    Wow! Finally, everything is clear to me :)

  • @raphaelprates1500
    @raphaelprates1500 Před rokem

    Awesome video! Thank you for sharing your knowledge

  • @whitefang1987
    @whitefang1987 Před 2 lety +1

    Good video. For the building step once you made changes, I thought it was good that you built locally to show the updated files, but think it would have been better if you had gone into detail that you could update the docker file to add a build step for you. So you can make sure the code builds from within the container as well not just it builds on my box, which would help illustrate that someone else could build & run the application.

  • @petersoderstrom857
    @petersoderstrom857 Před 2 lety +2

    Great video. I thank you.

  • @user-cq3qb6es9h
    @user-cq3qb6es9h Před rokem

    Thanks a lot. The first sane description of Docker I see.

  • @ankur.singhs2111
    @ankur.singhs2111 Před 2 lety +1

    extreme quality content. Thanks.

  • @aniketshetye9639
    @aniketshetye9639 Před rokem

    That's really awesome explanation , much appreciated , thanks !!!

  • @GunelMammadova93
    @GunelMammadova93 Před rokem

    The best explanation so far! Thank you! :)

  • @josephrabbit
    @josephrabbit Před 2 lety +1

    Perfect tutorial, thanks !!!

  • @HtopSkills
    @HtopSkills Před 2 lety +2

    Clear explanation

  • @pasmimmo
    @pasmimmo Před 3 lety +1

    Super Clean and helpfull 👍

  • @stuetz
    @stuetz Před 3 lety +2

    Really like it. Thank you.

  • @santoshsahani4364
    @santoshsahani4364 Před 3 lety +5

    Thank You JetBrains for this!

  • @user-kp5rb3yo5m
    @user-kp5rb3yo5m Před 8 měsíci

    Brilliant tutorial! Thanks a lot!

  • @Justdoit-zm8nz
    @Justdoit-zm8nz Před 7 měsíci

    Thank you for clear step by step instruction, save my assignment

  • @mwalilitobias9679
    @mwalilitobias9679 Před 2 lety +1

    Very Nice. Great content.

  • @dinobulja
    @dinobulja Před 2 lety +1

    Thank you, I like your videos. Very nice explanation.

  • @huynguyentien4135
    @huynguyentien4135 Před 2 lety +1

    Thanks ! you did amazing job

  • @yasirchoudhary824
    @yasirchoudhary824 Před 2 lety +1

    Very good explanation

  • @ronaldfungss
    @ronaldfungss Před rokem

    Nicely done. Thanks

  • @MostafaHany
    @MostafaHany Před 2 lety +1

    Brilliant tutorial

  • @mohamedelbagoury4027
    @mohamedelbagoury4027 Před 2 lety +1

    This is an excellent intro

  • @hyperborean72
    @hyperborean72 Před 2 lety +1

    excellent video. thank you so much

  • @afibrahim00
    @afibrahim00 Před 2 lety +1

    Impressive, Dalia!

  • @gopalkarane
    @gopalkarane Před 2 lety +1

    Thank you! It was very informative

  • @prajyotkarnik2039
    @prajyotkarnik2039 Před rokem

    The best Docker video everrrrr!!!!!!!!!!!!!!!!!!!!! She is just exceptional.

  • @saadthayab
    @saadthayab Před 2 lety +2

    very clear thanks a lot.

  • @raghavanaliassaravananm1546

    A masterpiece !!

  • @jeick3645
    @jeick3645 Před 8 měsíci

    this video is perfect in everything

  • @synthmania7275
    @synthmania7275 Před 2 lety +1

    Thank you so much for this video!! Very informative !! Just subscribed and became a customer :). Love JetBrains!

  • @ayuobmousa6589
    @ayuobmousa6589 Před rokem

    بالعربي عظيم جدا ...داليا العظيمة ⚘👑

  • @getsunova8894
    @getsunova8894 Před rokem

    Thx. I have a better understanding of docker now.

  • @reshid.seyidli
    @reshid.seyidli Před rokem

    best explanation ever !!!

  • @backtoGodhead0
    @backtoGodhead0 Před 3 lety +2

    so cool thank you!

  • @patiencemabasa6927
    @patiencemabasa6927 Před rokem

    Thank you, i understand docker now.

  • @superstargazer923
    @superstargazer923 Před 3 lety +1

    Please offer online courses. Your content is sooooo goooood!

  • @rajivroy1175
    @rajivroy1175 Před rokem +1

    just excellent.

  • @ramabookstroremalang9131

    I love JetBrains so much 💯💯

  • @learnthebasics9775
    @learnthebasics9775 Před rokem

    The best!!!!🤩

  • @jatinsharma3792
    @jatinsharma3792 Před 9 měsíci

    Perfect !!!

  • @akifzaman7280
    @akifzaman7280 Před 2 lety

    I ran into some issues, specially when it comes to running the containers. I believe the following points will help others following this tutorial.
    If your Main java class is within a package, make sure that within the DockerFile, you include completely qualified java-package + java-class name.
    I had to do...CMD java com.test.docker Main (as my Main class was within the com.test.docker package).
    Also, when executing the image, I had to include version numbers. So docker run :

    • @maasmans
      @maasmans Před 2 lety

      I think I have this issue but your explaination isn't clear to me about where to put extended package information.

  • @rayshadow6796
    @rayshadow6796 Před rokem

    How do you create docker container that runs a java swing GUI app? Would Be a great video!

  • @kamoteflavor
    @kamoteflavor Před rokem

    this is nice!

  • @dirkus3722
    @dirkus3722 Před 3 lety +1

    Thank you!

  • @MrValentine710
    @MrValentine710 Před 6 měsíci

    At 14:54 it doesn't seem to work for me, when I try to build the image. Is there an updated version?

  • @ryansossou646
    @ryansossou646 Před 2 lety +1

    i was looking for tutorial like that to start using docker and java , thanks
    and she got Cardi b voice by the way haha

  • @alexandersemigrodskikh8400

    Good!

  • @chiragrathod4757
    @chiragrathod4757 Před 3 lety +2

    Great

  • @enimal524
    @enimal524 Před rokem

    Excellent video, but at the end you should said that we had to stop de Containers, because they run indefinitely

  • @walidcoco
    @walidcoco Před měsícem

    tellement facile apres avoir vu ca, merci mam'zelle

  • @ucheyikenna9769
    @ucheyikenna9769 Před rokem

    this video cleared a lot of stuffed air for me, thank you...
    trying to run my container after I have built it, I get this [Error: Could not find or load main class EazyBankApplication] I need help on this

  • @arvindersinghji
    @arvindersinghji Před 3 lety +1

    Awesome.

  • @makshrech1263
    @makshrech1263 Před rokem

    please, mention there are different wrappers. Spwnt 2 hours useless until found official doc with sprint example

  • @Das.Kleine.Krokodil
    @Das.Kleine.Krokodil Před rokem +1

    Thanks

  • @hectorruiz8957
    @hectorruiz8957 Před rokem

    Does anyone know how to create a Dockerfile with Maven through IntelliJ?

  • @ehsanfaraji1962
    @ehsanfaraji1962 Před 2 lety

    خیلی خوب بود من رو که خیلی کمک کرد نهار هم دادن تازه واو

  • @Mexicanboy07thst1
    @Mexicanboy07thst1 Před 6 měsíci

    Can you do a tutorial on this using Maven

  • @michaelwatts8367
    @michaelwatts8367 Před 2 lety +1

    Nice, clear presentation, thanks. Although I think it cruel to put cats and elephants in shipping containers.

  • @nyancat370
    @nyancat370 Před 3 lety +1

    Amazing! Thank you so much!

  • @user-qm6fw7tj9g
    @user-qm6fw7tj9g Před měsícem

    Error: Could not find or load main class Main
    Caused by: java.lang.ClassNotFoundException: Main 😢

  • @niharr7
    @niharr7 Před 2 lety

    Nice tutorial.You did not explain how to send this my coworkers ?

  • @dowlathbashag65
    @dowlathbashag65 Před 3 lety

    Hi , facing some issue.Not able to create the image.
    C:\Docker-Java\Helloworld>docker version
    Client: Docker Engine - Community
    Cloud integration: 1.0.12
    Version: 20.10.5
    API version: 1.41
    Go version: go1.13.15
    Git commit: 55c4c88
    Built: Tue Mar 2 20:14:53 2021
    OS/Arch: windows/amd64
    Context: default
    Experimental: true
    Server: Docker Engine - Community
    Engine:
    Version: 20.10.5
    API version: 1.41 (minimum version 1.12)
    Go version: go1.13.15
    Git commit: 363e9a8
    Built: Tue Mar 2 20:15:47 2021
    OS/Arch: linux/amd64
    Experimental: false
    containerd:
    Version: 1.4.4
    GitCommit: 05f951a3781f4f2c1911b05e61c160e9c30eaa8e
    runc:
    Version: 1.0.0-rc93
    GitCommit: 12644e614e25b05da6fd08a38ffa0cfe1903fdec
    docker-init:
    Version: 0.19.0
    GitCommit: de40ad0
    C:\Docker-Java\Helloworld>docker build -t helloworld:1.0 .
    [+] Building 30.4s (3/3) FINISHED
    => [internal] load build definition from Dockerfile 0.2s
    => => transferring dockerfile: 150B 0.0s
    => [internal] load .dockerignore 0.1s
    => => transferring context: 2B 0.0s
    => ERROR [internal] load metadata for docker.io/library/openjdk:8 30.0s
    ------
    > [internal] load metadata for docker.io/library/openjdk:8:
    ------
    failed to solve with frontend dockerfile.v0: failed to create LLB definition: failed to do request: Head registry-1.docker.io/v2/library/openjdk/ma
    nifests/8: dial tcp 54.236.165.68:443: i/o timeout
    C:\Docker-Java\Helloworld>
    My Docker file :
    FROM openjdk:8
    RUN mkdir /app
    COPY out/production/Helloworld/io/dowlath /app
    WORKDIR /app
    cmd java dockerjava
    Please help on this.
    Thanks in advance.

    • @dowlathbashag65
      @dowlathbashag65 Před 3 lety

      @Dalia Abo Sheasha Sorry could not get. I spelled correctly.

    • @dowlathbashag65
      @dowlathbashag65 Před 3 lety

      @Dalia Abo Sheasha sure.....thnk q

    • @dowlathbashag65
      @dowlathbashag65 Před 3 lety

      sorry to disturb you.....i took the code from your repo. but mine java version is jdk 1.8.
      So Docker file i changed the version :
      # Use the OpenJDK 11 image as the base image
      FROM openjdk:8
      # Create a new app directory for my application files
      RUN mkdir /app
      # Copy the app files from host machine to image filesystem
      COPY out/production/HelloWorldDocker/ /app
      # Set the directory for executing future commands
      WORKDIR /app
      # Run the Main class
      CMD java Main
      Still getting the same problem.
      Microsoft Windows [Version 10.0.19041.928]
      (c) Microsoft Corporation. All rights reserved.
      C:\Docker-Java\HelloWorldDocker>docker build -t hello-world:1.0 .
      'docker' is not recognized as an internal or external command,
      operable program or batch file.
      C:\Docker-Java\HelloWorldDocker>docker version
      'docker' is not recognized as an internal or external command,
      operable program or batch file.
      C:\Docker-Java\HelloWorldDocker>docker version
      Client:
      Cloud integration: 1.0.14
      Version: 20.10.6
      API version: 1.41
      Go version: go1.16.3
      Git commit: 370c289
      Built: Fri Apr 9 22:49:36 2021
      OS/Arch: windows/amd64
      Context: default
      Experimental: true
      Server: Docker Engine - Community
      Engine:
      Version: 20.10.6
      API version: 1.41 (minimum version 1.12)
      Go version: go1.13.15
      Git commit: 8728dd2
      Built: Fri Apr 9 22:44:56 2021
      OS/Arch: linux/amd64
      Experimental: false
      containerd:
      Version: 1.4.4
      GitCommit: 05f951a3781f4f2c1911b05e61c160e9c30eaa8e
      runc:
      Version: 1.0.0-rc93
      GitCommit: 12644e614e25b05da6fd08a38ffa0cfe1903fdec
      docker-init:
      Version: 0.19.0
      GitCommit: de40ad0
      C:\Docker-Java\HelloWorldDocker>docker build -t hello-world:1.0 .
      [+] Building 5.4s (8/9)
      => [internal] load build definition from Dockerfile 0.1s
      => => transferring dockerfile: 371B 0.0s
      => [internal] load .dockerignore 0.1s
      => => transferring context: 2B 0.0s
      => [internal] load metadata for docker.io/library/openjdk:8 5.1s
      => [auth] library/openjdk:pull token for registry-1.docker.io 0.0s
      => [internal] load build context 0.1s
      => => transferring context: 2B 0.0s
      => CANCELED [1/4] FROM docker.io/library/openjdk:8@sha256:96c15b4ddc92615cc8ab30b60deba963232de521784661e1ab886b64a35a0149 0.1s
      => => resolve docker.io/library/openjdk:8@sha256:96c15b4ddc92615cc8ab30b60deba963232de521784661e1ab886b64a35a0149 0.0s
      => => sha256:96c15b4ddc92615cc8ab30b60deba963232de521784661e1ab886b64a35a0149 1.04kB / 1.04kB 0.0s
      => => sha256:48ff6191b3690194799579907f169ee28929cb4f04b391957232b69b3a139abb 7.83kB / 7.83kB 0.0s
      => => sha256:e35928794b16a9ae525cb294eadb94d1056f7ee4b0b2b204720233cda9d7ca7b 1.79kB / 1.79kB 0.0s
      => CACHED [2/4] RUN mkdir /app 0.0s
      => ERROR [3/4] COPY out/production/HelloWorldDocker/ /app 0.0s
      ------
      > [3/4] COPY out/production/HelloWorldDocker/ /app:
      ------
      failed to compute cache key: failed to walk /var/lib/docker/tmp/buildkit-mount144797670/out/production: lstat /var/lib/docker/tmp/buildkit-mount144797670/o
      ut/production: no such file or directory
      C:\Docker-Java\HelloWorldDocker>

  • @yannickmussche5068
    @yannickmussche5068 Před 2 lety

    what about .. Maven .. spring-boot:build-image?