Dockerfile >Docker Image > Docker Container | Beginners Hands-On | Step by Step

Поделиться
HTML-код
  • Опубликовано: 18 дек 2024

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

  • @sangativamsikrishna1691
    @sangativamsikrishna1691 Год назад +18

    Thanks Raghav, your way of explanation is simple and easy to understand. Thank you so much for your valuable contributions to people like me who are learning from basics.

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

      Hi Sangati, thanks a lot for your kind words

  • @issa_coder
    @issa_coder Год назад +11

    A straight-to-the-point tutorial! Thanks for your service in the spirit of betterment. Your tutorial is a great testament to the power of sharing knowledge, and helping others to gain an edge.

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

      Thanks for the kind words

  • @djfago6240
    @djfago6240 8 месяцев назад +2

    This is so far the best video on youtube with simple and straight to the point explanation. Thank you sir. I have subscribed

  • @niharikaverma9166
    @niharikaverma9166 Год назад +9

    This is amazing. I was trying EC2 instance first time to have docker run on it and this video made all my concepts very clear. Thanks for covering the security groups.

    • @RaghavPal
      @RaghavPal  Год назад +4

      You're very welcome Niharika

  • @rezasaffarpour1309
    @rezasaffarpour1309 11 месяцев назад +1

    Very good video that goes through all steps. Better than some professional teaching videos that do not explain details. Thank you, good job!

    • @RaghavPal
      @RaghavPal  11 месяцев назад

      Glad it was helpful Reza

  • @pensiveidea
    @pensiveidea 4 месяца назад

    Wonderfully concise and mentioning the why behind each choice is the difference between valuable and garbage training content. Thank you!

    • @RaghavPal
      @RaghavPal  4 месяца назад

      Glad it was helpful

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

    Randomly I got this video for Docker file, the way of teaching and pace of teaching is really good and appreciable. Thank you for such content I am following you from now and will see all the required videos on devops...

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

      Most welcome.. Glad it was helpful

  • @preethic170
    @preethic170 7 месяцев назад

    I had no idea about Dockerfile. Your session gave me a big support and confidence to write a dockerfile. Thank you very much.

    • @RaghavPal
      @RaghavPal  7 месяцев назад

      Great to know this Preethi

  • @sravani8666
    @sravani8666 Год назад +2

    Thank you so much sir...🙂🙂
    Your way of explaining is too good .. anyone can understand these lessons (without IT background also)

  • @brandoncazares8452
    @brandoncazares8452 9 месяцев назад +1

    Thanks Raghav, your explanation helped me understand way better.

    • @RaghavPal
      @RaghavPal  9 месяцев назад +1

      Most welcome Brandon

  • @servais-fridompandi3846
    @servais-fridompandi3846 4 месяца назад

    Raghav, you're amazing. You've just saved my day. Thank you very much for that beneficial content! Keep up the amazing work you've been delivering.

    • @RaghavPal
      @RaghavPal  4 месяца назад

      Happy to hear that.. keep learning

  • @pattyallbritton931
    @pattyallbritton931 6 месяцев назад

    Thank you for another perfectly explained video.... and thank you for keeping it simple and explaining even the small details.. some of us need that. Kudos to you!

    • @RaghavPal
      @RaghavPal  6 месяцев назад

      You're very welcome

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

    Dear Teacher/Guru the way u explained it was so clear and i can understand it without any effort. Thank you so much ❤

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

      Glad to hear that.. keep learning

  • @cebundy
    @cebundy 11 месяцев назад

    Thank you, Raghav. This was perfect for me! You were very clear and thorough. Great job!

    • @RaghavPal
      @RaghavPal  11 месяцев назад

      You're very welcome!

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

    Sir. Its really helpful for the community..!!! 👏 👏 Especially for the people like me who are slow learners

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

      Glad to hear that Rekha

  • @rohitwattamwar1460
    @rohitwattamwar1460 Год назад +1

    Explained in a very simple language. Thank you.

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

    Thank you very much for this video Raghav. It was very great to understand and learn. Not even GUVI classes taking this much effective classes.

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

    Great Playlist, Thanks Raghav your explanation is very good and really helpful to understand. Thanks a lot for this.

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

      Most welcome Tarun

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

    Amazing! so well explained in a simple language for beginners like me to fully understand.

    • @RaghavPal
      @RaghavPal  7 месяцев назад

      Glad it was helpful Laurencia.. humbled

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

    Very good teaching method. A new subcriber. Still learning Thanks!

    • @RaghavPal
      @RaghavPal  9 дней назад

      Awesome, thank you Abdul

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

    VEry very useful video here. Was looking for complete explanation and got clear answers to my current queries. Thanks for the video.

    • @RaghavPal
      @RaghavPal  Год назад +1

      Glad it was helpful Mike

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

    Clear and straight to the point. Thank you! 😊

  • @akhror-oshie
    @akhror-oshie Год назад

    Thanks, it really helps me to understand better the whole process of docker image and container👍

    • @RaghavPal
      @RaghavPal  Год назад +1

      Glad it was helpful Akhror

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

    Amazing docker presentation - especially how it can be linked to azure

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

      Glad it was helpful Nagendra

  • @chandrasekhargundojula
    @chandrasekhargundojula 7 месяцев назад

    Really good explanation and i got a clear picture of the docker topic

    • @RaghavPal
      @RaghavPal  7 месяцев назад

      Great to know this Chandrasekhar

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

    I REALLY ENJOY IT, I NOW KNOW THE DIFFERENCES

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

    Thank you very much sir for this video. I've learnt new things from you. Thank you.

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

      You are very welcome Blynk

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

    Great video for starters

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

      Glad you enjoyed it Yakesh.. Keep learning

  • @MeThAtTaCKSquiRRel
    @MeThAtTaCKSquiRRel 3 месяца назад

    Great tutorial! Super helpful

    • @RaghavPal
      @RaghavPal  3 месяца назад

      Glad it was helpful

  • @Niki-ue6fk
    @Niki-ue6fk Год назад +1

    Thank you , it's the best simplest explanation ever ,

  • @VinayKumarShah-dn6fn
    @VinayKumarShah-dn6fn 7 месяцев назад

    Very simple and effective video. Thanks

    • @RaghavPal
      @RaghavPal  7 месяцев назад

      Glad it was helpful Vijay

  • @sdharris10
    @sdharris10 Месяц назад +1

    At 16:57 dont use source anywhere 0.0.0.0 as the ip address in your inbound rules unless you want everyone on the internet hacking your machine. Im sure if you are watching a video about docker being hosted in an aws instance you know this already but if you dont then dont do this change it to the IP address that you want to access it

    • @RaghavPal
      @RaghavPal  Месяц назад

      Thanks for adding Scottie

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

    Thanks so much raghav best example have seen in the form of basic learning

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

    Thank you this helped me understand an area I was stuck on

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

    You are great teacher

  • @NewIndiA23
    @NewIndiA23 4 месяца назад

    Lovely and excellent...Learning dEVoPS

  • @b.kozhomberdieva1137
    @b.kozhomberdieva1137 4 месяца назад

    Thank you. Very useful and understandable

    • @RaghavPal
      @RaghavPal  4 месяца назад

      Glad it was helpful

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

    Amazing!!.. I really liked your explanation

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

      Glad to hear that Supriya, thanks

  • @sudhakarreddy2415
    @sudhakarreddy2415 3 месяца назад

    Excellent man

    • @RaghavPal
      @RaghavPal  3 месяца назад

      Thanks a lot Sudhakar

  • @renukachoudhari1018
    @renukachoudhari1018 Год назад +1

    Thanks. It is really helpful. Please share similar video while working on windows system. Or display parallel windows commands

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

      Sure Renuka, can check some videos here - automationstepbystep.com/
      although when you work in real world projects, mostly it will be a Linux system that will be used

  • @dmengrg
    @dmengrg Год назад +11

    Where have you been all my life?

  • @djamolmukhtarov3328
    @djamolmukhtarov3328 7 месяцев назад

    Great tutorial for beginners

    • @RaghavPal
      @RaghavPal  7 месяцев назад

      Glad it was helpful Djamol

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

    Bro, u saved me 😍

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

      Glad to know Ananya.. keep learning

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

    No any confusion, Easy to learn content. Thanks.

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

      Glad to know this

  • @durgaprasadpj.badri9974
    @durgaprasadpj.badri9974 День назад

    very well explained.

    • @RaghavPal
      @RaghavPal  День назад

      Glad it was helpful Durga

  • @shubhammishra6687
    @shubhammishra6687 Год назад +1

    At 9:49 you started the docker with command, can you please help me with macOS command to start the docker?

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

      Shubham
      Sure. Here are the macOS commands to start Docker:
      1. Open a terminal window.
      2. Type the following command:
      ```
      docker start
      ```
      This will start the Docker daemon.
      If you want to start Docker in the background, you can use the following command:
      ```
      docker start -d
      ```
      This will start the Docker daemon and detach it from the terminal window.
      You can also start Docker by specifying the name of the container that you want to start. For example, to start the container named `my-container`, you would use the following command:
      ```
      docker start my-container
      ```
      You can check if Docker is running by typing the following command:
      ```
      docker ps
      ```
      This will list all of the Docker containers that are running. If Docker is not running, you will see an empty list.
      I hope this helps

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

    Your explain very clear crystal

  • @Annamalai-h2f
    @Annamalai-h2f 2 месяца назад

    Simple and super video

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

      Thank you so much

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

    Thank you for the excellent case you choose which exposes us to AWS and its security policy configurations! So now I have a docker container is running with some customization configurations based on a publich docker image, may I ask how should I change its configuration and then deploy in some other hosts? Instead of manually repeat the whole process?

    • @RaghavPal
      @RaghavPal  5 месяцев назад +1

      Great to know this helped.. To change the configuration of your Docker container and deploy it on other hosts without manual repetition, follow these steps:
      1. Update Configuration:
      - Modify the necessary configuration files or environment variables within your Docker container. This could include settings related to application behavior, database connections, API endpoints, etc.
      - If your configuration is stored in environment variables, consider using a `.env` file or a configuration management tool (such as Consul or etcd) to manage these values
      2. Create a New Docker Image:
      - Once you've updated the configuration, create a new Docker image based on your customized container. You can do this using a `Dockerfile`
      - In your `Dockerfile`, specify the base image (the one you customized), copy any modified configuration files, and set environment variables
      - Build the new image using the following command (replace `` and `` with appropriate values):
      ```
      docker build -t : .
      ```
      3. Push the Image to a Registry:
      - Push the newly created image to a container registry (such as Docker Hub, Amazon ECR, or Google Container Registry). This step allows you to share the image across different hosts
      - Tag the image appropriately:
      ```
      docker tag : registry.example.com/:
      ```
      - Push it to the registry:
      ```
      docker push registry.example.com/:
      ```
      4. Deploy on Other Hosts:
      - On the target hosts, pull the updated image from the registry:
      ```
      docker pull registry.example.com/:
      ```
      - Run a new container using the pulled image:
      ```
      docker run -d --name my-container -p 8080:80 registry.example.com/:
      ```
      - Adjust the port mapping and other options as needed.
      5. Orchestration (Optional):
      - For more complex deployments, consider using container orchestration tools like Kubernetes or Docker Compose. These tools allow you to manage multiple containers, scaling, and service discovery.
      Remember to replace placeholders like ``, ``, and `registry.example.com` with your actual values. This approach ensures consistency across hosts and reduces manual effort
      -

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

      @@RaghavPal Thank you for the information! Much appreciated!

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

    Thank you so much for you tutorial. I want to ask something, should I create yaml file? I read some tutorial about create docker image, and they suggest to create yaml file and I didn't find any yaml file in your tutorial. Is yaml file important or optional?

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

      Faisal
      YAML files are optional for simple, single-container setups.
      They are highly recommended for multi-container applications to simplify management and ensure consistency.
      If you're starting with Docker, it's perfectly fine to begin with just a Dockerfile. As you build more complex applications, you'll likely find docker-compose.yml to be a valuable tool.

  • @YPat-uz7zp
    @YPat-uz7zp 4 месяца назад

    very nice presentation. I was struggling to understand docker, containers etc. now bit clear. (1) I have good industry experience but not used cloud platforms and finding challenging to learn the concepts. (2) also done programming on different platforms and not used to CLI based instructions so syntax and layout also not user friendly for me. let me know if you have any suggestions on these two points. many thanks

    • @RaghavPal
      @RaghavPal  4 месяца назад +1

      It's great that you have good industry experience! Transitioning to cloud platforms and getting comfortable with CLI-based instructions can be challenging, but with the right approach, you can overcome these hurdles. Here are some step-by-step suggestions for both points:
      ### 1. Learning Cloud Platforms
      Step 1: Start with the Basics
      - Choose a Cloud Provider: Start with one of the major cloud providers like AWS, Azure, or Google Cloud. Each has extensive documentation and beginner-friendly tutorials.
      - Understand Core Concepts: Focus on understanding core cloud concepts such as virtual machines, storage, networking, and databases.
      Step 2: Use Online Resources
      - Official Documentation: Utilize the official documentation and tutorials provided by the cloud provider.
      - Online Courses: Platforms like Coursera, Udemy, and LinkedIn Learning offer comprehensive courses on cloud computing.
      - RUclips Tutorials: There are many free tutorials on RUclips that can help you get started.
      Step 3: Hands-On Practice
      - Free Tier Accounts: Most cloud providers offer free tier accounts that allow you to experiment with their services without incurring costs.
      - Small Projects: Start with small projects to apply what you've learned. For example, deploy a simple web application or set up a virtual machine.
      Step 4: Join Communities
      - Forums and Groups: Join forums like Stack Overflow, Reddit, or specific cloud provider communities to ask questions and learn from others.
      - Meetups and Webinars: Attend meetups and webinars to stay updated and network with professionals.
      ### 2. Getting Comfortable with CLI-Based Instructions
      Step 1: Understand the Basics
      - Learn Basic Commands: Start with basic commands for file navigation, manipulation, and system monitoring. Commands like `ls`, `cd`, `cp`, `mv`, `rm`, and `top` are essential.
      - Use Tutorials: Websites like Codecademy and freeCodeCamp offer tutorials on using the command line.
      Step 2: Practice Regularly
      - Daily Practice: Make it a habit to use the CLI for daily tasks. This will help you get comfortable with the syntax and layout.
      - Small Projects: Create small projects that require CLI usage, such as automating tasks with shell scripts.
      Step 3: Use CLI Tools
      - CLI Tools for Cloud: Learn to use CLI tools provided by cloud providers, such as AWS CLI, Azure CLI, or Google Cloud SDK. These tools simplify cloud management tasks.
      - Text Editors: Get familiar with text editors like Vim or Nano, which are often used in CLI environments.
      Step 4: Reference Guides
      - Cheat Sheets: Keep cheat sheets handy for quick reference. Many websites offer downloadable CLI cheat sheets.
      - Man Pages: Use the `man` command to access the manual pages for various commands (e.g., `man ls`).
      ### Additional Tips
      - Stay Patient: Learning new concepts and tools takes time. Be patient with yourself and celebrate small victories.
      - Seek Help: Don’t hesitate to ask for help from colleagues, mentors, or online communities.
      - Stay Updated: Technology evolves rapidly, so make it a habit to stay updated with the latest trends and updates in cloud computing and CLI tools.
      By following these steps, you'll gradually become more comfortable with cloud platforms and CLI-based instructions. Keep practicing and exploring
      -

    • @YPat-uz7zp
      @YPat-uz7zp 4 месяца назад

      @@RaghavPal Dear Raghav many thanks for detail response. you are star ✨

  • @md.jahidhasan2481
    @md.jahidhasan2481 Год назад

    Nice Presentation brother!

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

      Thanks for watching Jahid

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

    Hope my mentor copy this video to take classes. Same format he was tech us today.

  • @ShankarRS-gm1oh
    @ShankarRS-gm1oh Год назад

    Excellent teaching Sir tq

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

      You're most welcome Shankar

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

    This was really helpful and well explain>

    • @RaghavPal
      @RaghavPal  10 месяцев назад +1

      Thanks Tanveer

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

    Very good explanation, thanks.

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

    Very nice tutorial! :)

  • @suniljagtap622
    @suniljagtap622 11 месяцев назад

    Very nice & Informative

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

    So crystal clear

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

      Thanks a lot Srija

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

    Great video👏

  • @durgamini1625
    @durgamini1625 8 месяцев назад +1

    Thanks for the explanation! I am working on the applicable where it will automatically open the reports after my tests but when creating pipeline through dockers it's opened So I have copied the results of html file created from docker image to local instance.
    Now my question how to open the html content which copied from docker image using docker run

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

      Durga
      If you've copied an HTML file from a Docker image to your local instance and want to view it using `docker run`, here are a few approaches you can take:
      1. Using an HTTP Server (e.g., Apache HTTPd):
      - This method involves creating a Docker image based on an HTTP server (such as Apache HTTPd) and serving your HTML file through it.
      - Here's a step-by-step guide:
      1. Create a Dockerfile with the following content:
      ```Dockerfile
      FROM httpd:2.4
      COPY ./public-html/ /usr/local/apache2/htdocs/
      ```
      2. Build the Docker image:
      ```
      docker build -t my-apache2 .
      ```
      3. Run the container:
      ```
      docker run -dit -p 8080:80 --name my-running-app my-apache2
      ```
      4. Your HTML page should now be available at [yourip:8080/public-html](yourip:8080/public-html) ¹.
      2. Mounting a Volume:
      - If you have the HTML file locally, you can mount it into a running container using the `-v` option.
      - For example, if your HTML file is in the `/path/to/your/html` directory, you can run:
      ```
      docker run --name some-nginx -v /path/to/your/html:/usr/share/nginx/html:ro -d nginx
      ```
      - Replace `/path/to/your/html` with the actual path to your HTML file ².
      3. Viewing HTML Source Inside the Container:
      - If you want to view the HTML source code directly inside the container, you can install an editor (e.g., Vim) and use it to inspect the file.
      - Execute the following commands within the container:
      ```
      docker exec -u 0 -it /bin/bash
      apt-get update
      apt-get install vim
      ```
      - Replace `` with the actual ID of your running container ⁴.
      Choose the method that best suits your requirements, and you'll be able to view your HTML content from the Docker image

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

      @@RaghavPal Thanks for the reply. Sure I will try any one method. You are my guru, I have learned so many tools from your videos

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

    Well Explained. thanks for sharing

  • @Mr_expert_gameplay
    @Mr_expert_gameplay 3 месяца назад

    Thanks, To my understanding once we build any code then we can make that build into container and later can store that container in dockerhub for the later use and for reference .
    I hope i am right here. 😅

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

    Sir!!!!!!!!!thankyou 😊😊😊😊

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

      Most welcome Rajeswari

  • @billysomers-pg
    @billysomers-pg 10 месяцев назад

    Simple as it can be, loved it. However, I find it kind of funny that you app was working on port 80, even though there wasn't any rule in your security group.

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

      Thanks Billy... I believe it was open for all connections,

    • @billysomers-pg
      @billysomers-pg 10 месяцев назад

      @@RaghavPal Regardless, it was a great walk through

  • @suchismitadash2399
    @suchismitadash2399 9 месяцев назад +1

    This is such a wonderful video. I followed along with you but i stopped step #5 because while running the docker build -t myapp i got errors. I think it could because i am using my work laptop. Then i tried using environmental variables for proxy still i get error. Can you please help

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

      Suchismita
      When encountering issues with Docker builds related to proxies, there are a few steps you can take to troubleshoot and resolve the problem:
      1. Proxy Configuration:
      - Ensure that your proxy settings are correctly configured on your laptop.
      - Check if you need to set environment variables like `http_proxy` and `https_proxy` to point to your corporate proxy server.
      2. Docker Proxy Configuration:
      - Docker uses its own proxy settings, separate from your system's proxy.
      - You can configure Docker to use your corporate proxy by modifying its configuration.
      - Open the Docker preferences/settings and navigate to the Proxy section.
      - Enter the proxy details (host, port, username, password) if required.
      3. Docker Build Arguments:
      - When building a Docker image, you can pass build arguments using the `--build-arg` flag.
      - For example:
      ```
      docker build --build-arg http_proxy=your.proxy:8080 --build-arg https_proxy=your.proxy:8080 -t myapp .
      ```
      - Replace `your.proxy` and `8080` with your actual proxy details.
      4. DNS Configuration:
      - Sometimes DNS resolution can cause issues. Ensure that your DNS settings are correctly configured.
      - You can try changing the DNS server in Docker settings to a reliable one (e.g., Google's public DNS: `8.8.8.8`).
      5. Restart Docker Daemon:
      - After making changes, restart the Docker daemon to apply the new settings.
      - You can do this from the Docker preferences/settings.
      6. Check Firewall Rules:
      - Verify that your firewall or security software is not blocking Docker connections.
      - Adjust firewall rules if necessary.
      7. Test Connectivity:
      - Test if you can access external resources (e.g., `ping google.com`) from within a running Docker container.
      - If not, it might be related to proxy or DNS issues.
      Remember that Docker builds happen in a separate environment (inside containers), so the proxy settings need to be propagated correctly.
      ..

  • @aditalware1952
    @aditalware1952 Год назад +1

    Nice tutorial, i am confused in the last part where you added an inbound rule. What difference did that make?

    • @RaghavPal
      @RaghavPal  Год назад +1

      Okay, that I had to do to open the port to be accessible from outside

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

      Do a small security group tutorial and it will be easy for you to understand that part, it's not complicated but crucial

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

    great video bro! thanks a lot!

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

    excellent explanation

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

    hey, great video! I just have one question.
    You didn't specify a SO for your image, normally we put this in the FROM command.
    So, in this case, where is this image getting the operating system from? You didn'y specfiy the SO at any point.

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

      Gustavo
      You're correct, the Docker demo I provided did not explicitly specify a base image in the `FROM` command. This may cause confusion, as most Docker images are built upon existing base images.
      In the specific case of the demo, the image was getting its operating system from the **scratch** image. The `scratch` image is a special reserved image in Docker that represents an empty filesystem. Using `FROM scratch` essentially instructs Docker to build the image starting from a completely blank slate.
      While this is possible for very simple images, it's not a common practice for building production-grade Docker images. Most images rely on existing base images to provide essential libraries, utilities, and the underlying operating system.
      For the sake of clarity and best practices, future demonstrations should explicitly specify a base image using the `FROM` command, such as:
      ```
      FROM ubuntu:latest
      ```
      This clearly indicates that the image is based on the latest version of Ubuntu and inherits its operating system and dependencies.
      I apologize for the confusion caused by the previous demo. Thank you for pointing out the omission, as it helps ensure the information provided is accurate and helpful.

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

    Nice explanation

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

      Thanks and welcome madhava

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

    your teaching was super sir and how to write playbook in ansible make one vedieo sir

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

      Sure I will Parameswari

  • @hareeshjavvadhi3556
    @hareeshjavvadhi3556 Год назад +1

    Can u make video about how to lunch docker image or docker container in kubernetes cluster

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

      I will plan Hareesh, Can check the existing Kubernetes videos here automationstepbystep.com/

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

      @@RaghavPal thank you for responding sir

  • @superpowerscholar2855
    @superpowerscholar2855 4 месяца назад

    can i do all this through mac terminal itself ? macos is also linux based os right??

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

    All well and good if you want to see Hello World! on the screen but how do you make it do anything useful? How do you get real applications inside the container that can be used like MQTT?

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

      This was for beginners to get started and understand concepts with hands-on, will plan for more sessions

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

      @@RaghavPal while it was informative it didn't go deep enough to be of any real use. What might be useful is an even higher level video that explains where these files fit into the scheme of docker. Then these instructions might make more sense.

    • @RaghavPal
      @RaghavPal  Год назад +1

      I will try to do more videos on this

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

    Thank you!

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

    Hi. Plz do docker tutorial playlists.

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

      Tejesh
      can find Docker here - automationstepbystep.com/
      I will plan to add more lectures

  • @sangativamsikrishna1691
    @sangativamsikrishna1691 Год назад +1

    Aslo please make a note Raghav, that I have asked you to make a video on how Code quality testing is done using SonarQube and Testing processes done in CI process in Automation of Devops process.
    Please make sure to get it as per your free time.
    Thank you

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

    super thank you!

  • @manishaverma-te5oy
    @manishaverma-te5oy Год назад

    Thank you so much Raghav for this amazing tutorial. But i am unable to run it on localhost

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

      Most welcome Manisha.. can check all the steps again.. also try some other online examples

  • @xoticlodge3013
    @xoticlodge3013 Месяц назад

    can you please help im a bit confused, do i need to get the nginx package for my linux server?
    when i access the page i get "Welcome to nginx! If you see this page, the nginx web server is successfully installed and working"
    it didnt read the index.html hello world.
    i am using a ubuntu server on the same network but different machine.
    i added 8080/tcp and 80/tcp to ufw as well

    • @RaghavPal
      @RaghavPal  Месяц назад

      Try this:
      1. Create Dockerfile
      Dockerfile
      FROM nginx:alpine
      COPY index.html /usr/share/nginx/html/index.html
      EXPOSE 80
      2. Create index.html
      Make sure you have a simple index.html file in the same directory as your Dockerfile:
      Hello World
      Hello, World!
      3. Build the Docker Image
      Run the following command in the terminal:
      docker build -t my-nginx-image .
      4. Run the Docker Container
      Start the container and map the ports:
      docker run -d -p 8080:80 my-nginx-image
      5. Check UFW Rules
      Ensure UFW allows traffic on port 8080:
      sudo ufw allow 8080/tcp
      6. Access Your Page
      Open a web browser and go to:
      :8080
      Replace with your server's IP address.
      Troubleshooting
      If you see the default Nginx page, ensure index.html is in the same directory as your Dockerfile.
      Check container logs for errors:
      docker logs
      That's it! You should see your "Hello, World!" page.
      -

  • @sharadshrivastava4285
    @sharadshrivastava4285 3 месяца назад

    Where you have installed docker ?
    In the app dir or somewhere else.
    Also, how to check if docker is installed and in which location it is installed?

    • @RaghavPal
      @RaghavPal  3 месяца назад

      Sharad
      To check if Docker is installed and to find its installation location, you can follow these steps:
      Open a terminal or command prompt.
      Type the command docker --version and press Enter
      If Docker is installed, you should see a response indicating the version of Docker installed, such as Docker version 20.10.7, build f0df350
      Find the Docker installation location:
      The installation location of Docker varies depending on the operating system you're using:
      On Linux:
      Type the command which docker and press Enter.
      This will display the path to the Docker executable, such as /usr/bin/docker.
      On Windows:
      Type the command where docker and press Enter.
      This will display the path to the Docker executable, such as C:\Program Files\Docker\Docker
      esources\bin\docker.exe.
      On macOS (using Homebrew):
      Type the command brew --prefix docker and press Enter.
      This will display the path to the Docker installation, such as /usr/local/opt/docker.
      If you're still having trouble finding the installation location, you can try searching for the Docker executable in your system's file system or checking the installation logs for more information.
      -

    • @sharadshrivastava4285
      @sharadshrivastava4285 3 месяца назад

      @@RaghavPal thank you Raghav. I was not expecting such a swift and quick reply. Appreciated 👍

    • @sharadshrivastava4285
      @sharadshrivastava4285 3 месяца назад

      I am getting error COPY requires at least two arguments, but only one is provided. Destination could not be determined

    • @RaghavPal
      @RaghavPal  3 месяца назад

      will need more details.. exactly on which command do you get this.. any more details will help troubleshooting

    • @sharadshrivastava4285
      @sharadshrivastava4285 3 месяца назад

      @@RaghavPal thank you for your kind reply. I am getting above error while executing docker build -t myapp .

  • @harishbabuds1363
    @harishbabuds1363 7 месяцев назад

    grate thank you

    • @RaghavPal
      @RaghavPal  7 месяцев назад

      Most welcome Harish

  • @sp9648
    @sp9648 6 месяцев назад

    nice explanation sir, but i dint understand u didn't start nginx service how can u access

    • @RaghavPal
      @RaghavPal  6 месяцев назад

      It's there in the instructions given in Dockerfile. Please check again

  • @preethic170
    @preethic170 7 месяцев назад +1

    please put a video on docker-compose

    • @RaghavPal
      @RaghavPal  7 месяцев назад

      Preethi
      can find it in my Docker playlist.. can check here automationstepbystep.com/

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

    Good 👍😊

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

    Hi Raghav. I had a question. How can we run docker-compose.yml file in ec2 machine for Selenium. Can you tell the steps or create a video on the same.

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

      Hi Arpit
      Here are the steps on how to run a docker-compose.yml file in an EC2 machine for Selenium:
      1. Create an EC2 instance.
      2. Install Docker Engine and Docker Compose on the EC2 instance.
      3. Copy your docker-compose.yml file to the EC2 instance.
      4. Run the following command to start the Docker containers:
      ```
      docker-compose up
      ```
      The Docker containers will start and Selenium will be running on the EC2 instance.
      Here are the detailed steps:
      1. **Create an EC2 instance.**
      Go to the AWS Console and click on the **EC2** service. Then, click on the **Launch Instance** button. Select the instance type and the operating system that you want to use. For this tutorial, we will use the **t2.medium** instance type and the **Ubuntu Server 20.04 LTS** operating system.
      2. **Install Docker Engine and Docker Compose on the EC2 instance.**
      Once the EC2 instance is up and running, you need to install Docker Engine and Docker Compose. To do this, run the following commands:
      ```
      sudo apt update
      sudo apt install docker.io
      sudo apt install docker-compose
      ```
      3. **Copy your docker-compose.yml file to the EC2 instance.**
      The docker-compose.yml file is a configuration file that tells Docker how to start the Docker containers. You can create this file yourself or you can download it from a repository. Once you have the docker-compose.yml file, you need to copy it to the EC2 instance. To do this, you can use a file transfer utility like **FileZilla** or **WinSCP**.
      4. **Run the following command to start the Docker containers:**
      ```
      docker-compose up
      ```
      This command will start the Docker containers that are defined in the docker-compose.yml file. Once the Docker containers are started, Selenium will be running on the EC2 instance.
      I hope this helps

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

      Thanks a Lot Raghav for the steps and prompt response!

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

    Thanks a lot!

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

    Hi Sir...
    In Docker file, Many instructions/components may not change. i think only CMD and ENTRYPOINT varies in each and every Dockerfile.
    My question to you sir....
    Based upon a programming language, CMD and ENTRYPOINT may change. As a Non-It student and As a fresher, i have to know the complete flow of each and every application to write a Dockerfile. How i can achieve that and how i can write CMD and ENTRYPOINT fields in a Dockerfile for different programming languages ?
    *I have seen a lot of videos, But i cannot get clarity about the applications like DOTNET, PYTHON etc.....
    *So, i request you sir to upload a video about the workflow of different applications(programming/other) for DevOps engineers. It helps a lot for freshers and i think it will be also helpful for non-it background students as well ?

    • @RaghavPal
      @RaghavPal  Год назад +1

      Harinath
      You are correct that the CMD and ENTRYPOINT instructions are the most likely to change in a Dockerfile, depending on the programming language and the application.
      The **CMD** instruction specifies the default command that will be executed when the container starts. The **ENTRYPOINT** instruction specifies the command that will always be executed when the container starts, even if it is overridden by the `CMD` instruction.
      For example, the following Dockerfile for a Python application specifies the `python` command as the `CMD`:
      ```
      FROM python:3.9
      CMD python app.py
      ```
      This means that when the container starts, the `python` command will be executed, and the `app.py` file will be passed as an argument.
      The following Dockerfile for a .NET application specifies the `dotnet` command as the `ENTRYPOINT`:
      ```
      FROM mcr.microsoft.com/dotnet/core/sdk:3.1
      ENTRYPOINT dotnet myapp.dll
      ```
      This means that when the container starts, the `dotnet` command will always be executed, and the `myapp.dll` file will be passed as an argument.
      The `CMD` and `ENTRYPOINT` instructions can also be used to pass environment variables to the application. For example, the following Dockerfile for a Python application specifies the `PORT` environment variable:
      ```
      FROM python:3.9
      ENV PORT 8080
      CMD python app.py
      ```
      This means that when the container starts, the `PORT` environment variable will be set to `8080`.
      The `CMD` and `ENTRYPOINT` instructions can be used to customize the behavior of the container. The specific commands and arguments that you use will depend on the programming language and the application.
      I understand that you are a non-IT student and a fresher. It can be difficult to learn the workflow of different applications, especially if you are not familiar with the programming languages. However, there are a few resources that can help you.
      One resource is the Docker documentation. The documentation has a section on writing Dockerfiles, and it also has examples of Dockerfiles for different programming languages.
      Another resource is the Docker Hub. Docker Hub is a repository of Docker images, and it also has a community forum where you can ask questions and get help from other Docker users.
      Finally, there are a number of online courses and tutorials that can teach you how to write Dockerfiles. A quick Google search will turn up many results.
      I hope this helps! I am still under development, and I am not able to create videos yet. However, I can provide you with information and resources that can help you learn about Dockerfiles and the workflow of different applications.

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

      @@RaghavPal Thanks a lot ❤SIR...Thanks for your valuable TIME and information. It helps me a lot SIR...

  • @sandhyab1151
    @sandhyab1151 Год назад +1

    docker build -t myapp (my question is in -t what -means and why should we give - before t )

    • @RaghavPal
      @RaghavPal  Год назад +1

      Sandhya
      The `-t` flag in the `docker build` command stands for **tag**. It is used to specify a name for the image that will be built. The tag is used to identify the image and to make it easier to manage.
      The `-` before the `t` flag is required because it tells Docker that the following argument is a flag. Flags are used to modify the behavior of Docker commands.
      Here is an example of how to use the `-t` flag to build an image:
      ```
      docker build -t myapp .
      ```
      This command will build an image from the current directory and tag it with the name `myapp`. The `.` at the end of the command tells Docker to build the image from the current directory.
      Once the image has been built, it can be used to create containers.
      Here is an example of how to create a container from the `myapp` image:
      ```
      docker run -it myapp
      ```
      This command will create a new container from the `myapp` image and start it in interactive mode.
      The `-t` flag is a very useful tool for managing Docker images. It allows you to easily identify and manage your images.
      Here are some of the benefits of using the `-t` flag:
      * It makes it easier to identify and manage your images.
      * It allows you to share your images with others by providing them with the tag name.
      * It allows you to track the changes that have been made to your images.
      * It allows you to create different versions of your images for different environments.
      Overall, the `-t` flag is a valuable tool for anyone who uses Docker. It is a simple way to add more flexibility and control to your image management workflow.

  • @ganesan.d5403
    @ganesan.d5403 5 месяцев назад

    Thanks Raghav

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

      Most welcome Ganesan

  • @AkshayaS-p9u
    @AkshayaS-p9u 3 месяца назад

    Is it possible to create a docker image and container for an application that runs in Windows and pull it on Ubuntu and use that ?

    • @RaghavPal
      @RaghavPal  3 месяца назад +1

      Akshaya
      While it's technically possible to create a Docker image for a Windows application, running it on Ubuntu might not be straightforward. Here's why:
      Windows applications require a Windows environment
      Windows applications are designed to run on a Windows operating system which provides specific system libraries, frameworks, and dependencies that are not native to Ubuntu

    • @AkshayaS-p9u
      @AkshayaS-p9u 3 месяца назад

      @@RaghavPal Got it. Thank you !

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

    I see the welcome to the nginx page on the localhost web browser, (I tried all steps you had mentioned on a mac) and not the hello world page! what am I doing wrong? I even switched the browser from chrome to safari but I still see the same error!

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

      Vartika
      will need to check your setup and will need more details to troubleshoot

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

      @@RaghavPal sure, is there a particular setup file that I should share?

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

      I guess the issue may be the setup in aws security group, you will have to make ports open for communication, can check online on this

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

      @@RaghavPal oh I am not using the aws server, I am just using my local mac to run this.

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

      will need to check details then

  • @bhanuprakashsundari-i7b
    @bhanuprakashsundari-i7b 5 месяцев назад

    Hello my question is even though i created everything perfectly I couldn’t find this container running

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

      Bhanu
      Let's break down the problem step by step to troubleshoot why you can't find the container running.
      Step 1: Verify Dockerfile and Image Creation
      * I assuem you created a Dockerfile and built a Docker image successfully. To confirm:
      + Check if your Dockerfile is in the correct location and has the correct syntax.
      + Run `docker images` to list all available images on your system. Verify that your newly created image is listed with the expected name and tag
      Step 2: Verify Container Creation
      * You mentioned you ran the container, but let's double-check:
      + Run `docker ps -a` to list all containers, including stopped ones. Check if your container is listed
      + If you don't see your container, try running `docker run` again with the same command you used initially
      Step 3: Check Container Status
      * If your container is listed, check its status:
      + Run `docker ps` to list only running containers. If your container is not listed, it might be stopped or exited
      + Run `docker inspect -f '{{.State.Status}}' ` to check the container's status, where `` is the ID of your container
      Step 4: Investigate Container Exit
      * If your container is stopped or exited, investigate why:
      + Run `docker logs ` to check the container's logs for any errors or issues that might have caused it to exit
      + Run `docker inspect -f '{{.State.ExitCode}}' ` to check the exit code of the container
      Step 5: Verify Docker Daemon and System Resource Availability
      * Ensure the Docker daemon is running and system resources are available:
      + Run `docker info` to verify the Docker daemon is running and healthy.
      + Check system resource availability, such as CPU, memory, and disk space, to ensure they are not exhausted.
      Step 6: Review Docker Run Command
      * Review the `docker run` command you used to start the container:
      + Check if you specified a detach flag (`-d` or `--detach`) to run the container in the background.
      + Verify that you didn't specify a command that would cause the container to exit immediately (e.g., `docker run myimage echo "Hello World"`).
      By following these steps, you should be able to identify why your container is not running as expected. If you're still stuck
      -

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

    How would i access your helloword from my pc? Or It's not possible. I am new to docker.

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

      John
      As of now the server is not running.. but if the ports are open.. it can be accessed using public ip and port of the running app

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

    Sir, I am not able to perform the last step. I am not able to launch the webpage via browser while copying the ip address from the aws and pasting it on browser.

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

      Vaishnav
      will need more details. What exactly is the error, do you see any message. Check the steps again and also try some online help. Let me know

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

    the mechanics are great (how to do something step by step) but the practicality is missing; that is, if you could provide a real or small application to be containerized it would help a great deal.

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

      I will work on this Linda
      Thanks for the feedback

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

    I have a basic doubt if anyone can help... why do you even need to create a docker image for a .html file? if you create it here on a Linux EC2 machin and install it on a windows machine as it is... without creating a docker container... will it not work?

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

      Dushyant
      It's unlikely that an HTML file created on a Linux EC2 machine will function directly on a Windows machine without any additional steps, even if you avoid using Docker containers. Here's why:
      Differences in environment:
      Operating system: Each OS has its own file system structure, libraries, and executables. While HTML is a platform-agnostic language, scripts or functionalities embedded within the HTML might rely on specific Linux components unavailable on Windows.
      Web server configuration: Even if the HTML itself renders, different web servers on Linux and Windows may interpret certain elements differently, leading to inconsistencies or errors.
      Dependencies: Many modern web applications involve JavaScript frameworks, libraries, or databases. These dependencies might be packaged differently for Linux and Windows, requiring additional installation or configuration on the Windows machine.
      Potential issues:
      File paths: Relative paths used in the HTML might not resolve correctly on the Windows file system.
      Permissions: Files generated on the Linux machine might have permissions incompatible with Windows, causing access issues.
      Missing binaries or libraries: Script execution within the HTML might require specific Linux binaries or libraries unavailable on Windows.
      Possible solutions:
      Use Docker: Building your application (including the HTML) within a Docker container ensures a consistent and isolated environment across platforms.
      Package dependencies: If avoiding Docker, ensure all dependencies your HTML relies on are available and compatible with the Windows environment.
      Test and adapt: Thoroughly test your HTML on both Linux and Windows machines, making adjustments for platform-specific differences.
      In summary, while theoretically possible, directly transferring an HTML file from Linux to Windows without Docker poses many challenges. Using Docker or carefully adapting your HTML and its dependencies for Windows are generally more reliable and efficient options.

    • @dushyantchaudhry4654
      @dushyantchaudhry4654 10 месяцев назад +1

      @@RaghavPal This is really helpful Raghav. I will also use it to explain the concept to my 15 year old. Sharing of knowledge likes this as we know helps make careers and lives of many people. Thank you and best wishes!!

  • @AdityaSingh-sz5js
    @AdityaSingh-sz5js Год назад

    when i am running "docker info " command it throwing '-bash: docker: command not found' statement how should i resolve this?

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

      Aditya
      The error message `-bash: docker: command not found` means that the `docker` command is not available in your current shell. This can happen if Docker is not installed on your system or if it is not in your `$PATH` environment variable.
      To resolve this error, you need to make sure that Docker is installed and that it is in your `$PATH` environment variable.
      Here are the steps on how to install Docker on Linux:
      1. Open a terminal window.
      2. Run the following command to install Docker:
      ```
      sudo apt-get install docker.io
      ```
      3. Once Docker is installed, you need to add it to your `$PATH` environment variable. You can do this by editing your `~/.bashrc` file.
      ```
      export PATH=$PATH:$HOME/bin/docker
      ```
      4. Save and close the `~/.bashrc` file.
      5. Restart your shell.
      Once you have completed these steps, you should be able to run the `docker info` command without any errors.
      If you are still having trouble, you can refer to the Docker documentation for more information.
      Here are some additional things you can try:
      * Make sure that Docker is installed on your system.
      * Check that the Docker daemon is running.
      * Make sure that the `docker` command is in your `$PATH` environment variable.
      * Try running the `docker info` command in a different shell.
      * If you are still having trouble, you can post a question on the Docker forum or contact the Docker support team.

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

    I'm getting trouble while build docker it is taking forever to build an image can you please fix this?

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

      Unfortunately, troubleshooting a slow Docker image build requires more context about your specific scenario. To help you fix the issue, please provide additional information about the following:
      *1. Dockerfile:*
      * Share the content of your Dockerfile or a relevant snippet that takes the longest to build.
      * Mention the specific instruction causing the delay.
      *2. Build Context:*
      * Describe the size and complexity of the files included in your build context.
      * Mention any large dependencies being downloaded during the build.
      *3. Build Logs:*
      * Share the output of the `docker build` command, including any error messages or warnings.
      * Look for specific lines indicating slow downloads or processing steps.
      *4. System Resources:*
      * Mention your available system resources, such as CPU cores, RAM, and disk space.
      * Consider if resource limitations might contribute to the slow build.
      *5. Build Environment:*
      * Specify the version of Docker and the operating system you're using.
      * Mention if you're using any specific features or plugins like multi-stage builds.
      Once you provide this information, I can analyze the specific factors causing the slow build and offer targeted solutions.
      Here are some additional tips for optimizing your Docker image build:
      *Use multi-stage builds:* Separate your build process into stages to minimize the final image size.
      *Cache layers:* Leverage Docker caching to avoid rebuilding frequently used layers.
      *Minimize dependencies:* Only include necessary dependencies within your image.
      *Use smaller base images:* Opt for smaller base images like Alpine Linux to reduce the initial image size.
      *Optimize build scripts:* Analyze and optimize your build scripts for efficiency.
      *Increase available resources:* If possible, allocate more CPU cores, RAM, or faster storage for smoother builds.
      By applying these tips and providing the necessary details, I can effectively assist you in fixing the slow Docker image build issue.