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

Поделиться
HTML-код
  • Опубликовано: 20 окт 2024
  • All Free Tutorials - AutomationStep...
    Last session • How to setup and use D...
    STEPS
    Create a Dockerfile
    Add instructions in Dockerfile to create Docker image
    Run Dockerfile to create Docker image
    Run Docker image to create Docker container
    Access the application running in Docker container
    Dockerfile > Docker Image > Docker Container > Access the App
    Step 1 - Create a new directory mkdir myapp
    cd myapp
    Step 2 - Create a file called "index.html" echo "Hello, world!" > index.html
    Step 3 - Create a file named Dockerfile touch Dockerfile
    Step 4 - Open the "Dockerfile" file in a text editor and add the following lines:
    FROM nginx
    COPY index.html /usr/share/nginx/html
    This Dockerfile defines a new Docker image that
    uses the official nginx image as a base
    then copy the index.html file to the appropriate location in the image
    A Dockerfile is a text file with instructions to build a Docker Image
    When we run a Dockerfile, Docker image is created
    When we run the docker image, containers are created
    Step 5 - Start docker & Build docker image from dockerfile
    docker build -t myapp .
    This command builds a new Docker image with the tag "myapp" using the Dockerfile in the current directory.
    Step 6 - Run docker container from the image
    docker run -p 8080:80 myapp
    This tells Docker to run the myapp container and map port 8080 on your local machine to port 80 inside the container
    Step 7 - Access the app
    Open a web browser and navigate to localhost:8080 to see the "Hello, world!" message displayed in your web browser.
    If you are using AWS EC2 Linux, you will need to make sure that the security group for your AWS Linux instance allows inbound traffic on port 8080 (or whichever port you chose to map to port 80 inside the container).
    Here's how to modify the security group:
    Open the Amazon EC2 console at console.aws.am....
    In the navigation pane, choose "Instances".
    Select your AWS Linux instance in the list.
    Choose the "Security" tab in the bottom pane.
    Select the security group associated with your instance and choose the "Edit inbound rules" button.
    Add a new rule with the following settings:
    Type: "Custom TCP Rule"
    Protocol: "TCP"
    Port Range: "8080" (or whichever port you chose to map to port 80 inside the container)
    Source: "0.0.0.0/0" (or restrict the source IP address range to your specific needs)
    After modifying the security group, you should be able to access the web page served by your Docker container by navigating to <Public_IP_of_your_instance>:8080 in a web browser.
    Also see: Terraform - • Terraform complete cou...
    ▬▬▬▬▬▬▬
    Every Like & Subscription gives me great motivation to keep working for you
    You can support my mission for education by sharing this knowledge and helping as many people as you can
    If my work has helped you, consider helping any animal near you, in any way you can
    Never Stop Learning
    Raghav Pal
    ▬▬▬▬ USEFUL LINKS ▬▬▬▬
    Ask Raghav - bit.ly/2CoJGWf
    Shorts Eng - bit.ly/3H9bifV
    Shorts Hindi - bit.ly/3XY7XqN
    GitHub Repositories - github.com/Rag...
    Udemy Discounts - automationstep...
    Stories - automationstep...
    ▬▬ CI | CD | DEVOPS ▬▬
    Jenkins Beginner - bit.ly/2MIn8EC
    Jenkins Tips & Trick - bit.ly/2LRt6xC
    Docker - bit.ly/2MInnzx
    Jenkinsfile - bit.ly/3JSMSZ7
    Kubernetes - bit.ly/2MJIlMK
    ▬▬ API TESTING ▬▬
    Web Services (API) - bit.ly/2MGafL7
    SoapUI - bit.ly/2MGahmd
    Postman 2022 - bit.ly/3JWm4qX
    Rest Assured - bit.ly/3zUdhRD
    Karate API Testing - bit.ly/3w3H5Ku
    JMeter API Testing - bit.ly/3AgVPar
    Katalon Studio API Testing - bit.ly/2BwuCTN
    API Mocking - bit.ly/3bYPsjS
    ▬▬ PERFORMANCE TESTING ▬▬
    JMeter Beginner - bit.ly/2oBbtIU
    Gatling - bit.ly/3QrWfkV
    Dockerfile Tutorial for Beginners
    Creating a Docker Image: Step-by-Step Guide
    Hands-on Docker Container Creation for Beginners
    How to Build a Docker Image from Scratch
    Dockerfile Basics: A Complete Guide
    Dockerfile and Docker Image Creation for Beginners
    Beginner's Guide to Building a Docker Container from a Dockerfile
    Docker Image Creation: A Comprehensive Tutorial
    Creating Your First Docker Container: A Beginner's Hands-On Guide
    Step-by-Step Guide to Building Docker Images and Containers for Beginners
    -

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

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

    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 10 месяцев назад +9

    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  10 месяцев назад

      Thanks for the kind words

  • @djfago6240
    @djfago6240 6 месяцев назад +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 Год назад +8

    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

  • @WolfmaninKannada
    @WolfmaninKannada 7 дней назад

    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  6 дней назад

      Glad to hear that.. keep learning

  • @rezasaffarpour1309
    @rezasaffarpour1309 9 месяцев назад +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  9 месяцев назад

      Glad it was helpful Reza

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

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

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

      Glad it was helpful

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

    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  6 месяцев назад

      Most welcome.. Glad it was helpful

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

    Thanks Raghav, your explanation helped me understand way better.

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

      Most welcome Brandon

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

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

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

    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  5 месяцев назад

      Great to know this Preethi

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

    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  4 месяца назад

      You're very welcome

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

    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  2 месяца назад

      Happy to hear that.. keep learning

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

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

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

      You're very welcome!

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

    Explained in a very simple language. Thank you.

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

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

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

      Glad to hear that Rekha

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

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

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

      Glad it was helpful Nagendra

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

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

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

      Glad it was helpful Laurencia.. humbled

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

    I REALLY ENJOY IT, I NOW KNOW THE DIFFERENCES

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

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

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

      Most welcome Tarun

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

    Clear and straight to the point. Thank you! 😊

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

    Very simple and effective video. Thanks

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

      Glad it was helpful Vijay

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

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

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

      Great to know this Chandrasekhar

  • @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.

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

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

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

      You are very welcome Blynk

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

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

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

    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  9 дней назад

      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.

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

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

  • @ramyakd
    @ramyakd 22 дня назад

    Great video for starters

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

      Glad you enjoyed it Yakesh.. Keep learning

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

    Thank you. Very useful and understandable

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

      Glad it was helpful

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

    No any confusion, Easy to learn content. Thanks.

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

      Glad to know this

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

    Your explain very clear crystal

  • @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

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

    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  2 месяца назад +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 2 месяца назад

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

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

    Lovely and excellent...Learning dEVoPS

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

    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. 😅

  • @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

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

    Great tutorial! Super helpful

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

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

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

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

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

    You are great teacher

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

      Thank you! 😃

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

    Great tutorial for beginners

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

      Glad it was helpful Djamol

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

    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  3 месяца назад +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 3 месяца назад

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

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

    Amazing!!.. I really liked your explanation

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

      Glad to hear that Supriya, thanks

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

    Excellent teaching Sir tq

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

      You're most welcome Shankar

  • @durgamini1625
    @durgamini1625 6 месяцев назад +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  6 месяцев назад

      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 6 месяцев назад

      @@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

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

    So crystal clear

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

      Thanks a lot Srija

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

    Very good explanation, thanks.

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

      Glad it was helpful!

  • @SMH17-x2o
    @SMH17-x2o Год назад

    Excellent explanation

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

    Well Explained. thanks for sharing

  • @suchismitadash2399
    @suchismitadash2399 7 месяцев назад +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  7 месяцев назад

      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.
      ..

  • @Annamalai-h2f
    @Annamalai-h2f День назад

    Simple and super video

  • @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

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

    Excellent man

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

      Thanks a lot Sudhakar

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

    Very nice & Informative

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

    This was really helpful and well explain>

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

      Thanks Tanveer

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

    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  8 месяцев назад

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

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

      @@RaghavPal Regardless, it was a great walk through

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

    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  10 месяцев назад

      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.

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

    Nice Presentation brother!

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

      Thanks for watching Jahid

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

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

  • @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

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

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

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

      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

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

    Great video ❤

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

    Very nice tutorial! :)

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

      Glad you like it!

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

    Nice explanation

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

      Thanks and welcome madhava

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

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

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

      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
      -

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

    Bro, u saved me 😍

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

      Glad to know Ananya.. keep learning

  • @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

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

    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  11 месяцев назад

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

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

      @@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  11 месяцев назад +1

      I will try to do more videos on this

  • @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

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

    Thank you!

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

    great video bro! thanks a lot!

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

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

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

      Most welcome Rajeswari

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

    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  Месяц назад

      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 Месяц назад

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

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

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

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

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

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

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

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

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

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

      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.

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

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

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

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

  • @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.

  • @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.

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

    super thank you!

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

    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  Месяц назад +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 Месяц назад

      @@RaghavPal Got it. Thank you !

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

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

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

      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

  • @dmengrg
    @dmengrg 11 месяцев назад +10

    Where have you been all my life?

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

      hope it was helpful

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

    I have tried the same in Azure and getting "The site cann't be reached' error. Any help appreciated.

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

      Mohan
      will need more details with your steps and logs

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

    please put a video on docker-compose

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

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

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

    grate thank you

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

      Most welcome Harish

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

    Thank you

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

      You're welcome

  • @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

  • @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

  • @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!

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

    Failed to start docker.service: Unit docker.service not found. I'm getting this error, how to solve?

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

      Sejal
      The error message "Failed to start docker.service: Unit docker.service not found" indicates that your system cannot locate the Docker service unit file. This can happen for several reasons, so here are some steps you can take to troubleshoot and solve the issue:
      1. Confirm Docker installation:
      Verify that Docker is installed correctly on your system. You can check this by running the command docker ps in your terminal. If it returns an error message that Docker is not found, you need to install or reinstall Docker according to your operating system instructions.
      2. Check service status:
      Even if Docker is installed, the service might not be active. Run the command sudo systemctl status docker.service to check its status. If it shows "inactive" or "failed," you need to activate it.
      3. Activate Docker service:
      Use the command sudo systemctl start docker.service to activate the Docker service. Check the status again using sudo systemctl status docker.service to confirm it's running.
      4. Verify unit file existence:
      If the service activation fails, it's possible that the unit file is missing. Depending on your Docker installation method, the unit file location might differ.
      For Debian/Ubuntu-based systems, the file should be located at /lib/systemd/system/docker.service.
      For Red Hat/CentOS-based systems, the file should be located at /usr/lib/systemd/system/docker.service.
      If you installed Docker using a different method, check its documentation for the specific location of the unit file.
      5. Additional troubleshooting:
      If the unit file is missing, it might indicate an incomplete or corrupted Docker installation. Try reinstalling Docker and double-check the installation process.
      In some cases, system configurations or permission issues might prevent the service from running. Consult the Docker documentation for your operating system for more advanced troubleshooting tips or consider seeking help from your system administrator.
      By following these steps and investigating the cause based on your specific system configuration, you should be able to resolve the "Unit docker.service not found" error and get your Docker service running again.

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

    Thanks Raghav

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

      Most welcome Ganesan

  • @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

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

    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  8 месяцев назад

      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 8 месяцев назад +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!!

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

    Hi. Plz do docker tutorial playlists.

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

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

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

    Can you make a video on Test a Docker container without API key

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

    Thanks a lot!

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

    Hi sir when i am running using public ip got from ec2 i am geeting message " welcome to nginx , if you are seeing this message means nginx setuped successfully"
    But i am.not getting the index.html file
    Please reply

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

      Shivam
      Here are steps to address it:
      1. Check Nginx Configuration:
      Review /etc/nginx/nginx.conf: Ensure the server block for your website has the correct root directive pointing to the directory containing your index.html file.
      Verify index Directive: Confirm the index directive includes index.html as a default file to serve.
      2. Inspect File Permissions:
      Check Read Permissions: Use ls -l /path/to/index.html to verify Nginx has read permissions for the file and its parent directories.
      Adjust Permissions: If necessary, use chmod to grant appropriate permissions (e.g., chmod 644 /path/to/index.html).
      3. Examine Server Logs:
      Analyze Error Messages: Check Nginx error logs at /var/log/nginx/error.log for clues about configuration issues or file access problems.
      4. Test File Existence:
      Access Directly: Try accessing the index.html file directly using the full path in your browser to rule out file corruption or location issues.
      5. Restart Nginx:
      Reload Configuration: Use sudo service nginx reload or sudo systemctl reload nginx to apply any configuration changes.
      6. Check Firewall Rules:
      Allow HTTP Traffic: Ensure your EC2 instance's firewall rules allow inbound HTTP traffic on port 80 (or the port Nginx is listening on).
      7. Consider SELinux:
      Disable Temporarily: If using SELinux, temporarily disable it using sudo setenforce 0 to test if it's interfering. Re-enable with sudo setenforce 1 after troubleshooting.
      8. Validate Directory Structure:
      Confirm Structure: Ensure the index.html file is located in the directory specified by the root directive in your Nginx configuration.
      Additional Tips:
      Virtual Hosts: If using virtual hosts, ensure the correct virtual host configuration is active.
      Custom Configuration: Review any custom Nginx configuration files for potential issues.
      Troubleshooting Tools: Use tools like curl or wget to test accessing the file from the server itself

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

      @@RaghavPal thanks for your support, will try this

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

    Good 👍😊

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

    I tried to build the image it shows access denied fir nginix

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

      Ahkansha
      Check this forums.docker.com/t/issue-403-forbidden-13-permission-denied-nginx/121658