Dockerfile Tutorial - Docker in Practice || Docker Tutorial 10

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ธ.ค. 2024

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

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

    Probably the dockerfile tutorial with the highest "information density" I know. Thank you for the sharp and precise explanations !

  • @TechWorldwithNana
    @TechWorldwithNana  5 ปีที่แล้ว +19

    0:36- Review Diagram - Workflow
    1:49 - What is a Dockerfile?
    2:22 - How the Dockerfile commands map to the image environment
    8:05 - Create the Dockerfile (Demo)
    12:00 - Build an image out of the Dockerfile (Demo - simulating Jenkins)
    15:02 - Start the Application to verify: 1) App starts successfully 2) App environment is configured correctly
    19:34 - do improvement - copy only relevant files
    👉🏼 For any questions/issues/feedback, please leave me a comment and I will get back to you as soon as possible.
    👉🏼 Also please let me know what you want to learn about Docker & Kubernetes.
    Also please don't forget to subscribe and give me a thumbs up if you liked my video 🤗

    • @madhavijonnavitula9668
      @madhavijonnavitula9668 ปีที่แล้ว

      Very useful video....❤from india

    • @krishnamedas5895
      @krishnamedas5895 ปีที่แล้ว +1

      where do i get server.js file i can see it on my local machine thanks

  • @MuhammedDahab
    @MuhammedDahab 4 ปีที่แล้ว +5

    I actually took all my stuff and come resided here on your channel ,this becomes my new home , thank you very much , much love

    • @TechWorldwithNana
      @TechWorldwithNana  4 ปีที่แล้ว +3

      Awesome :D Glad to hear you like my channel :)

  • @osmoofnybble
    @osmoofnybble 3 ปีที่แล้ว +2

    Thanks!

  • @RaffaelW81
    @RaffaelW81 4 ปีที่แล้ว +2

    For me the best beginners-tutorial for Docker I could find on youtube. Many thanks and greetings from Switzerland.

    • @TechWorldwithNana
      @TechWorldwithNana  4 ปีที่แล้ว

      That's very kind of you Raffael. I appreciate the support. Stay safe Switzerland. 🙂

  • @armankarimi9209
    @armankarimi9209 3 ปีที่แล้ว +2

    Docker official tutorials are very bad... But you explain them like it is the easiest thing in the world! Thanks Nana

  • @acronproject
    @acronproject ปีที่แล้ว +6

    Good Teacher in World, is you are.

  • @rokofromhell9264
    @rokofromhell9264 5 ปีที่แล้ว +8

    Your way of explaining it makes me fully understand each of the concepts, thanks!

  • @kareemakeem8602
    @kareemakeem8602 2 ปีที่แล้ว +2

    Good morning, I'm here to really commend and appreciate your good works. I do really enjoyed your series of videos on docker and Kubernetes. They are very inspiring, full of contents and simplified. Thanks

  • @Mona_Guitar
    @Mona_Guitar 4 ปีที่แล้ว +7

    Omg, I've learnt so much from your video! You explained everything in details and very clearly. This helped me create my first Dockerfile, and it works perfectly

  • @alivalizada8543
    @alivalizada8543 3 ปีที่แล้ว +1

    Thanks

  • @shadhashmi3714
    @shadhashmi3714 ปีที่แล้ว

    Your voice makes me crazy you have the most rare voice I have ever heard
    Excellent video for this topic

  • @madhun1875
    @madhun1875 4 ปีที่แล้ว +2

    Hello Anna, concepts are very clear and understandable the way you have explained it with the example which makes us to understand very well. really appreciate your effort and hope to watch your more videos. thank you. and I wish all the best.

    • @TechWorldwithNana
      @TechWorldwithNana  4 ปีที่แล้ว +2

      You are very much welcome Madhu. I hope this tutorial series has greatly helped you in one way or another. 🙂

  • @SasidaranS
    @SasidaranS 2 ปีที่แล้ว +3

    Thanks a lot Nana, for simple and clear explanations.

  • @wrongturn_w
    @wrongturn_w 3 ปีที่แล้ว +15

    This video is so good I felt an urge to throw cash at the screen! How can we support the channel? Patreon? Merch? Paid courses?

    • @TechWorldwithNana
      @TechWorldwithNana  3 ปีที่แล้ว +5

      😄 Happy to hear that! I have several paid courses, check out www.techworld-with-nana.com/
      Or right below the video it says "THANKS", where you can support me. Thank you so much in advance! :)

    • @okonkwo.ify18
      @okonkwo.ify18 2 ปีที่แล้ว

      I can throw in my btc wallet address for her 😂

  • @nandhakumarv6023
    @nandhakumarv6023 ปีที่แล้ว +1

    Excellent teaching. Thanks to Nana

  • @tonyhomfray
    @tonyhomfray 4 ปีที่แล้ว +2

    Great explanations! Really enjoying this video series and actually getting my head around Docker - thanks Nana!

    • @TechWorldwithNana
      @TechWorldwithNana  4 ปีที่แล้ว

      Thanks Tony, glad you like my explanations :)

  • @Tiejocky
    @Tiejocky 3 ปีที่แล้ว +2

    Nicely done video. Its clear and to the point. Thank you for your efforts and sharing your knowledge with the rest of us.

  • @ssushovan
    @ssushovan 3 ปีที่แล้ว +1

    I must say that, this is by far the best video/tutorial on Docker in TH-cam. I always had doubt about Dockerfile & Docker-Compose files but, thanks to your excellent videos and explanations. It cleared all my doubts. I'm really grateful to you. Wish I found your channel a lot earlier. Thanks a lot, Nana! :) #Subscribed

  • @narendrar9940
    @narendrar9940 4 ปีที่แล้ว +1

    First of all thanks again for this video, very clearly explained with detail in simple terms, it is helping me in very much in my work!

    • @TechWorldwithNana
      @TechWorldwithNana  4 ปีที่แล้ว

      You're welcome! Happy to hear that they help you in your work :)

  • @hamza-325
    @hamza-325 3 ปีที่แล้ว +9

    Thanks for the video, but I think there are two things missing:
    1- Exposing the ports in the Dockerfile and attaching them from the run command.
    2- Using a Dockerignore file instead of manually moving the files to another directory.

  • @sauravparida49
    @sauravparida49 4 ปีที่แล้ว +9

    Nana, am loving the way you are making us go through the concepts so clearly in a short amount of time , I had looked other videos but never felt docker this easy

  • @juleswombat5309
    @juleswombat5309 4 ปีที่แล้ว +6

    That is really cool explanation, especially of the container having its own file system and how to connect into a container.
    What was missing, was actually a demonstration of using your the app. I presume the host browser could see and connect to the running containerised application, but does this require the Web port mapping are also stated in the Docker file?

  • @djnikhil058
    @djnikhil058 4 ปีที่แล้ว +1

    @TechWorld with Nana : Thanks for this , its really helpful. Most of the concepts are cleared with you Docker in Practice Course. Really Appreciated :)

    • @TechWorldwithNana
      @TechWorldwithNana  4 ปีที่แล้ว

      You're welcome Nikhil. I'm grateful for the opportunity to help. 🙂

  • @oateurman
    @oateurman 4 ปีที่แล้ว +2

    You 're really really good at explaining Docker clearly - will recommend to my data science students

  • @vedant6460
    @vedant6460 2 ปีที่แล้ว +2

    Thanks a lot for this video !!!

  • @siddheshdeshmukh3635
    @siddheshdeshmukh3635 ปีที่แล้ว

    I watch your video and clear my doubt since I was not able to clear last three days ♥️♥️♥️♥️

  • @tim_bize
    @tim_bize ปีที่แล้ว +1

    Great tutorial, Nana!

  • @madhusai7021
    @madhusai7021 4 ปีที่แล้ว +2

    All Videos r outstanding and I don't know how to say thanks to u. 🤗🤗✌

    • @TechWorldwithNana
      @TechWorldwithNana  4 ปีที่แล้ว +1

      Thanks a lot! Support me by subscribing, liking and sharing with others, who would be interested in such videos 🙂

  • @eat_good_live_better
    @eat_good_live_better 4 ปีที่แล้ว

    Thanks Nana. This video eradicates some of my confusions.

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

    Thank you so much for making this video. I love you Nana. ❤😂

  • @abdul123wahid
    @abdul123wahid 4 ปีที่แล้ว +1

    Thanks Nana. It is very useful to understand.

  • @cedricfitzer4327
    @cedricfitzer4327 3 ปีที่แล้ว

    just starting out with docker. this was so helpful. thank you very much!!

  • @offisongemmanuel6932
    @offisongemmanuel6932 ปีที่แล้ว

    You're the best!!!!
    Thank you so much for this.

  • @JamieTwells
    @JamieTwells 5 ปีที่แล้ว +3

    Great video, great instructions.

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

    ammmmaaaaaaaazing! great quality content! thank you so much!

  • @maridubois842
    @maridubois842 3 ปีที่แล้ว +1

    Best explanation ever!!

  • @ankitrathore007
    @ankitrathore007 4 ปีที่แล้ว +1

    Great Explanation.. Thanks a lot for bringing such a valuable content.. 🤗

  • @dipankarrahuldey6249
    @dipankarrahuldey6249 2 ปีที่แล้ว

    Basically the RUN command is like running a command during building the image, and when the image build is done, the command to be executed is written as CMD.

  • @bijanzohouri98
    @bijanzohouri98 3 ปีที่แล้ว +1

    Good one, thanks for sharing this video

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

    Informative and useful video. Two things 1. For windows ENV settings, do we use / or // or \ or \\ for PATHs 2. For java classpath, is it ["java","-cp"] or ["java","-classpath"] or ENV CLASSPATH? I would really appreciate it if you could go indepth into Dockerfiles for Java-Maven and Java-SpringBoot-Maven projects. Thanks again for your educational videos

  • @ChandraShekhar-by3cd
    @ChandraShekhar-by3cd ปีที่แล้ว

    Best informative video ever!

  • @bhupathivarma9170
    @bhupathivarma9170 3 ปีที่แล้ว

    Wooww mam 🙏🙏 awesome explaination..👌👌crisp n clear.. thanks a ton.

  • @i.i
    @i.i 2 ปีที่แล้ว

    great job thanks

  • @이런황
    @이런황 4 ปีที่แล้ว

    You are amazing. I love your series and channel. Keep up your good work thanks!

  • @tubejim101
    @tubejim101 4 ปีที่แล้ว +1

    Thank you for making these videos

    • @TechWorldwithNana
      @TechWorldwithNana  4 ปีที่แล้ว +1

      You're welcome Tubejim. Please share with your friends and spread the knowledge. 🙂

  • @KiranKumar-st9oc
    @KiranKumar-st9oc 3 ปีที่แล้ว

    You are a great instructor

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

    That's an excellent tutorial!

  • @maratatt1537
    @maratatt1537 4 ปีที่แล้ว

    Thank you Nana! It's absolutely a great tutorial.

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

    Dear Nana, thanks for creating very simple and informative playlist, I am exceuting all the code mentioned in the playlist and i am able to follow everything you presneted in this. Now at this stage when we are running our app image as container, we are getting the message app is listening at port 3000. But when i open this on brower it is not showing anythinb. Why this is happening? In order to run this from our image what steps I need to follow.

  • @nanditasahu2358
    @nanditasahu2358 3 ปีที่แล้ว

    Clear Explanation.

  • @alexsuholitko2528
    @alexsuholitko2528 2 ปีที่แล้ว

    Great explanation. Thank you 😊

  • @taotaotan5671
    @taotaotan5671 4 ปีที่แล้ว

    That was a great explanation. Subscribed.

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

    I have a question. In this docker file all we are doing is running node server.js, but what about the dependencies on mongo and mongo-express containers? Shouldn’t we include them as well as part of the Dockerfile?

  • @sravani-wp6xf
    @sravani-wp6xf 8 หลายเดือนก่อน

    Thanks for your video and explained well

  • @josehurtado6871
    @josehurtado6871 ปีที่แล้ว

    What an excellent tutorial!!

  • @srikumar9176
    @srikumar9176 4 ปีที่แล้ว +1

    Thanks for the clear explanations..!! After deploying my-app as container, the browser just shows empty page, tried to debug but no luck. Any idea, why??
    However when my-app is run on host machine, I was able to see output in the browser and connects to mongodb container without any issues.

    • @queenofpain6483
      @queenofpain6483 3 ปีที่แล้ว

      same i just encountered the same issue. Were you able to solve it?

    • @hamza-325
      @hamza-325 3 ปีที่แล้ว

      I didn't follow this tutorial, but I think that she forgot to expose the port 3000 that is used by the Node server. I think that she had to write an EXPOSE command in the Dockerfile and add -d 3000:3000 to the docker run command.

    • @TimothyHuey
      @TimothyHuey 2 ปีที่แล้ว

      @@queenofpain6483 the solution that worked for me was to change the line
      let mongoUrlLocal = "mongodb://admin:password@localhost:27017";
      to
      let mongoUrlLocal = "mongodb://admin:password@mongodb:27017";
      I will post at top. Several people are saying they are having the same problem. My environment is WSL2 on Windows so my fix may be specific to that environment or may be more widely applicable.

  • @yassinsoltani2725
    @yassinsoltani2725 4 ปีที่แล้ว +1

    you are the best ! thank you so much

  • @khrysb.1043
    @khrysb.1043 4 ปีที่แล้ว

    Your videos are just amazing

  • @nareshkaayth4477
    @nareshkaayth4477 2 ปีที่แล้ว

    Hi Nana @TechWorld with Nana, Thanks for this amazing video of making a docker image. I am having one question. How we can run our image that depends on some other images as whole application like in this video, we have used MONGODB and MONGO-EPRESS UI images for storing the data in DB. In last 2 minutes you said we can run the docker image from docker compose. May i know we can do that..?? ...Thanks

  • @juanramon4954
    @juanramon4954 2 ปีที่แล้ว

    Very well explained

  • @zamora322
    @zamora322 2 ปีที่แล้ว

    Nana, thanks for sharing.

  • @انامسلموكفى
    @انامسلموكفى 5 หลายเดือนก่อน

    When I want to learn about Docker I just type Docker Nana if i didnt save the video. U re simply great in explaining Docker, also DevOps 😊.
    My question is about Dockerfile. I am trying to create an avalonia app inside a Docker Image. The app should run using the weston compositor in Ubuntu environment. I have already Avalonia running using X11 but I would like to use the weston compositor
    Any help ?
    Thank you for your great Videos

  • @ajmalkhalil752
    @ajmalkhalil752 2 ปีที่แล้ว

    Thanks, much appreciated.

  • @smrutiranjanpatra7186
    @smrutiranjanpatra7186 2 ปีที่แล้ว

    Hi Nana, what is the use of STOPSIGNAL in Dockerfile. Can you please explain with a example.

  • @nicetomeetugaming7024
    @nicetomeetugaming7024 2 ปีที่แล้ว

    Thanks for this amazing video mam!

  • @jpf504
    @jpf504 2 ปีที่แล้ว

    you are the best...

  • @mehrdadvh9479
    @mehrdadvh9479 3 ปีที่แล้ว

    Thanks for this , its really helpful

  • @thedacian123
    @thedacian123 ปีที่แล้ว

    what about dockerfile workdir command.After you copy from host to container woud not be fine to set workdir to /home/app so that each further command as run will be executing in the WORKDIR container directory?Thank you

  • @HemangJoshi
    @HemangJoshi 4 ปีที่แล้ว +1

    awesome videos maam...

  • @riddhimar4810
    @riddhimar4810 2 ปีที่แล้ว

    Thanks for this!

  • @MichaelSalo
    @MichaelSalo 2 ปีที่แล้ว

    It seems like the container isn't created until the deploy step. Would we ever want to create a container earlier, during development?

  • @jorgepadilla392
    @jorgepadilla392 4 ปีที่แล้ว +1

    Hi, thank you for the detail explanations, these tutorial are very good and to the point. I wanted to ask you if you something on secrets using docker-compose and also any BuildKit tutorials for docker? Thank you!

    • @TechWorldwithNana
      @TechWorldwithNana  4 ปีที่แล้ว +2

      Thanks Jorge, regarding your question "secrets using docker-compose and also any BuildKit tutorials for docker" sure you can ask, what do you mean exactly, do you have any example?

    • @jorgepadilla392
      @jorgepadilla392 4 ปีที่แล้ว +1

      @@TechWorldwithNana thank you, I think I figured it out, but your videos are very helpful and well explained. I am watching your kubernetes ones now. I appreciate your time and effort putting these together.

  • @muratcan__22
    @muratcan__22 2 ปีที่แล้ว

    you are so good!

  • @lakshmib412
    @lakshmib412 3 ปีที่แล้ว

    Thank you it's very helpful

  • @thagrizzly
    @thagrizzly 4 ปีที่แล้ว +1

    Hi Nana, thank you for your tutorials! I hava question! Where are the environment variables used for? In the server.js these values are hardcoded right?

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

    Great video

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

    As part of this Dockerfile why are we not doing RUN npm install?

  • @ahmedjarraya1739
    @ahmedjarraya1739 3 ปีที่แล้ว

    Hello Nana, i have a question
    let's suppose that i'm having a microservice app in which i'm using jenkins for continous integration for each microservice(each microservice has its own git repo in which i have specified the jenkinsfile, the src code and the dockerfile in order to build images for the genearted artifacts and pull them in dockerhub )How each image will talk to each other (i'm not going to build docker network manually i guess every thing should be done automatised )

  • @ahmedAmmar2006
    @ahmedAmmar2006 2 ปีที่แล้ว

    please why we ignore the mongodb image when creating the docker file as its necessary for our application

  • @anexiole
    @anexiole 3 ปีที่แล้ว +1

    thank you :)

  • @heenasejwal6953
    @heenasejwal6953 4 ปีที่แล้ว +1

    U are awesome, god bless u NANA

    • @TechWorldwithNana
      @TechWorldwithNana  4 ปีที่แล้ว

      Thank you Heena. Please don't forget to share with your friends. 🙂

  • @gustavobarbosa7493
    @gustavobarbosa7493 ปีที่แล้ว

    If I don't set an SO in my Dockerfile, will docker take the SO from the host system?

  • @Lunolux
    @Lunolux ปีที่แล้ว

    great video, thx

  • @ebiscaia
    @ebiscaia 3 ปีที่แล้ว

    Hi,
    How can I see a docker-file when the publisher hasn't put it on Docker Hub and there is no Git page? Also, you can use docker run --restart unless-stopped to ensure the container will restart after a reboot. Is it possible to do the same using docker compose?
    Thanks,
    Eduardo

  • @marctowersap8018
    @marctowersap8018 5 ปีที่แล้ว +1

    weird, I cannot connect to the database. I start it up, and I see it is unable to connect to database. My URL is "mongodb://mongoadmin:password123@localhost:27017"; I can connect to it via mongo-express, it worked before I put the node.js code into a image. node server works, I can see it connected to a database, "node". I stop it, then start the container, and "/home/nodeapp/server.js" fails with the unable to connect to database. If I changed the URL fro localhost to mongodb (the name of my container) and joined the container to the mongo network, then it starts up

    • @TechWorldwithNana
      @TechWorldwithNana  5 ปีที่แล้ว +1

      when you start the node app as a docker container, it must connect to MongoDB (another docker container) using the name (mongo), not the host:port. That's why before you build the image from node app, you must adjust the db url to mongodb://mongoadmin:password123@mongo. Of course the db url in practice will be set from outside, so you don't have to adjust it back and forth all the time. But this is how it works, just to understand the concept. Let me know if you have any further questions.

  • @avinashnew
    @avinashnew 3 ปีที่แล้ว +1

    Thank you

  • @rohanjoshi8420
    @rohanjoshi8420 ปีที่แล้ว

    I your javascript application is not working. It showing blank screen. I debugging the dependency version did my best still application not working having bugs. It returns blank screen in response+ in logs it shows error at get(profile-pic/) route but not seen any error. Help me

  • @cpManikanta
    @cpManikanta 3 ปีที่แล้ว

    Hi Nina thanks for video but there is some more content I expected like downloading the artifact from repo whith login into that prvt artifact by encrypting the login details and building the image with that artifact

  • @miemiemyothant627
    @miemiemyothant627 3 ปีที่แล้ว

    When i run this docker build command , it showed me this error failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount595932089/Dockerfile: no such file or directory
    Thank you Nana!

  • @انامسلموكفى
    @انامسلموكفى 10 หลายเดือนก่อน

    Best teacher :) , I ve two qst:
    1 . I become an error by building the image because of the encoding , the Dockerfile is in UTF16 encodoing how I could fix this to be in UTF8
    2. Can I run/deploy windows based images in Linux host

  • @okonkwo.ify18
    @okonkwo.ify18 2 ปีที่แล้ว

    Before building the image , I would v loved to take a look at your code if it had a .env file.

  • @zeeshanali2805
    @zeeshanali2805 2 ปีที่แล้ว

    Does running app with docker file will it run only app or both app and mongodb. Because in my case it is running app only and when I open browser the content of site at 3000 port is blank. And I am guessing it because of my mongodb is not running what say!
    Kindly please answer my query

  • @msurajnair7149
    @msurajnair7149 3 ปีที่แล้ว

    Thank you So much Nana, The concept was explained so nicely.
    I Just have one query, Can we implement docker volume in docker file if yes, then how? (I tried to search for related video content but could not find any)
    You did explain in this video how we can copy the content of a local directory in to the container while creating one which is good.

    • @ajitjagtap4495
      @ajitjagtap4495 2 ปีที่แล้ว

      Hello you use docker bind concept

  • @johnnybravo2665
    @johnnybravo2665 4 ปีที่แล้ว

    Hi! is it possible to change code without rebuilding image ? If we can, then pls tell how?

  • @bharathir8688
    @bharathir8688 2 ปีที่แล้ว

    Hi, I need to copy files that are generated in one container to another. How can I do that?

  • @cpManikanta
    @cpManikanta 3 ปีที่แล้ว

    It will be helpfull if it explained by using build command and by using jenkins to build container

  • @learner5023
    @learner5023 ปีที่แล้ว +1

    docker run my-app:1.0
    internal/modules/cjs/loader.js:965
    throw err;
    ^
    Error: Cannot find module '/home/app/server.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:962:15)
    at Function.Module._load (internal/modules/cjs/loader.js:838:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47 {
    code: 'MODULE_NOT_FOUND',
    requireStack: []
    }
    Hai Nana,
    After run the image build by docker file. I got this error. How to resolve this?

  • @chad136
    @chad136 3 ปีที่แล้ว

    If your docker instance is on a network that is isolated from the internet, can you download and then specify the node:alpine-13 image?

    • @MrSHowVIdeo
      @MrSHowVIdeo 3 ปีที่แล้ว

      I'm probably too late to answer u but I'm sure u can download images from another computer and pull images from that computer to ur isolated instance using scp , rsync or sftp or whatever other cool tool of ur choice without issues.

  • @RohitTiwari-mo8mi
    @RohitTiwari-mo8mi 4 ปีที่แล้ว

    In description Github links are missing.