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

Поделиться
HTML-код
  • Опубликовано: 15 мар 2023
  • All Free Tutorials - AutomationStepByStep.com/
    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.amazon.com/ec2/.
    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/Raghav-Pal
    Udemy Discounts - automationstepbystep.com/udem...
    Stories - automationstepbystep.com/stor...
    ▬▬ 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
    -

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

  • @issa_coder
    @issa_coder 8 месяцев назад +5

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

      Thanks for the kind words

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

    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

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

    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  Год назад +3

      You're very welcome Niharika

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

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

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

      Glad it was helpful Reza

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

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

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

      You're very welcome!

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

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

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

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

      Great to know this Preethi

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

    Clear and straight to the point. Thank you! 😊

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

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

      You're very welcome

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

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

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

      Most welcome.. Glad it was helpful

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

    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.

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

      Glad to know it helped

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

    Explained in a very simple language. Thank you.

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

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

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

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

      So nice of you Sravani

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

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

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

      Most welcome Tarun

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

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

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

      Glad it was helpful Laurencia.. humbled

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

    Thanks Raghav, your explanation helped me understand way better.

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

      Most welcome Brandon

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

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

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

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

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

      Glad it helped Gavin

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

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

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

      Glad to hear that Rekha

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

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

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

      You are very welcome Blynk

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

    Amazing!!.. I really liked your explanation

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

      Glad to hear that Supriya, thanks

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

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

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

      Great to know this Chandrasekhar

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

    great video bro! thanks a lot!

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

    Very simple and effective video. Thanks

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

      Glad it was helpful Vijay

  • @NewIndiA23
    @NewIndiA23 20 часов назад

    Lovely and excellent...Learning dEVoPS

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

    Very good explanation, thanks.

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

      Glad it was helpful!

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

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

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

      Glad it was helpful Nagendra

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

    Well Explained. thanks for sharing

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

      Most welcome Maskawath

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

    Very nice tutorial! :)

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

      Glad you like it!

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

    I REALLY ENJOY IT, I NOW KNOW THE DIFFERENCES

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

      Glad it helped Gody

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

  • @C.RonaldoCR7G
    @C.RonaldoCR7G 5 месяцев назад

    worked perfectly thanks so much

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

      You're welcome!

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

    This was really helpful and well explain>

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

      Thanks Tanveer

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

    Thanks a lot!

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

    Great tutorial for beginners

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

      Glad it was helpful Djamol

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

    You are great teacher

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

      Thank you! 😃

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

    Thank you!

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

    Your explain very clear crystal

  • @md.jahidhasan2481
    @md.jahidhasan2481 11 месяцев назад

    Nice Presentation brother!

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

      Thanks for watching Jahid

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

    super thank you!

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

    So crystal clear

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

      Thanks a lot Srija

  • @SMHawaldar-sf4zk
    @SMHawaldar-sf4zk 9 месяцев назад

    Excellent explanation

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

      Glad it was helpful

  • @ananyamahapatra6597
    @ananyamahapatra6597 12 дней назад

    Bro, u saved me 😍

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

      Glad to know Ananya.. keep learning

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

    Great video👏

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

      Thank you Premjith

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

    excellent explanation

  • @ShankarRS-gm1oh
    @ShankarRS-gm1oh 9 месяцев назад

    Excellent teaching Sir tq

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

      You're most welcome Shankar

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

    Very nice & Informative

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

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

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

    Nice explanation

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

      Thanks and welcome madhava

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

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

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

      Hope it helps all

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

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

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

      Most welcome Rajeswari

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

    Thank you

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

    grate thank you

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

      Most welcome Harish

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

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

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

  • @YPat-uz7zp
    @YPat-uz7zp 6 дней назад

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

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

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

    Thanks you

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

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

  • @AdityaSingh-sz5js
    @AdityaSingh-sz5js 11 месяцев назад

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

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

      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.

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

    No any confusion, Easy to learn content. Thanks.

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

      Glad to know this

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

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

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

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

      @@RaghavPal Regardless, it was a great walk through

  • @user-hn1kt3sq7x
    @user-hn1kt3sq7x 4 месяца назад

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

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

      Sure I will Parameswari

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

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

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

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

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

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

      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.

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

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

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

      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

  • @manishaverma-te5oy
    @manishaverma-te5oy 9 месяцев назад

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

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

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

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

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

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

      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

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

    Good 👍😊

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

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

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

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

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

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

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

      I will try to do more videos on this

  • @ganesan.d5403
    @ganesan.d5403 19 дней назад

    Thanks Raghav

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

      Most welcome Ganesan

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

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

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

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

    i dont understand the destination path of copy instruction , pls explain anyone

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

      will need more details on this

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

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

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

  • @tejeshgowda4970
    @tejeshgowda4970 18 дней назад

    Hi. Plz do docker tutorial playlists.

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

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

  • @bhanuprakashsundari-i7b
    @bhanuprakashsundari-i7b 26 дней назад

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

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

      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
      -

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

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

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

      Mohan
      will need more details with your steps and logs

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

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

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

      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.

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

    please put a video on docker-compose

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

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

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

    Can we use multiple os in same docker image

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

      No, it's not possible to directly run multiple operating systems within a single Docker image. Each Docker image is designed to encapsulate a single operating system and its associated environment.

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

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

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

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

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

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

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

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

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

      will need to check details then

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

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

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

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

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

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

      @@RaghavPal thanks for your support, will try this

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

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

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

      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

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

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

      I will work on this Linda
      Thanks for the feedback

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

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

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

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

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

    Pull access denied for nginix how to do that ???😢😢😢😢

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

      Hi Shamim
      The error message "pull access denied for nginx" means that you are not authorized to pull the nginx image from Docker Hub. This can happen for a few reasons:
      * You may not have logged in to Docker Hub.
      * You may not have the correct permissions to pull the image.
      * The image may be private and you do not have access to it.
      To fix the error message "pull access denied for nginx", you need to log in to Docker Hub and make sure that you have the correct permissions to pull the image. If the image is private, you will need to be granted access by the owner of the image.
      Here are the steps on how to log in to Docker Hub:
      1. Open a terminal window.
      2. Run the following command:
      ```
      docker login
      ```
      3. Enter your Docker Hub username and password.
      Once you have logged in to Docker Hub, you can check the permissions for the nginx image by running the following command:
      ```
      docker image inspect nginx
      ```
      The output of this command will show you the permissions for the image. If the image is private, you will see a "pull" section that shows the usernames that have access to the image.
      If you do not have access to the nginx image, you can contact the owner of the image and request access.
      Here are the steps on how to request access to a private image:
      1. Go to the Docker Hub page for the image.
      2. Click on the "Permissions" tab.
      3. Click on the "Request Access" button.
      4. Enter your Docker Hub username and a message explaining why you need access to the image.
      The owner of the image will be notified of your request and they can decide whether or not to grant you access.
      Once you have been granted access to the nginx image, you will be able to pull the image without any errors.

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

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

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

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

  • @dmengrg
    @dmengrg 8 месяцев назад +3

    Where have you been all my life?

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

      hope it was helpful

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

    Show docker multistage build

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

      will plan a lecture on this Sheethu

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

    unable to run docker on aws What is the command line to run docker on Windows

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

      Pavan
      The command line to run Docker on Windows is:
      ```
      docker run
      ```
      For example, to run the Ubuntu image, you would use the following command:
      ```
      docker run ubuntu
      ```
      This command will create a new container from the Ubuntu image and start it. You can then interact with the container using the `docker` command.
      Here are some other commands that you can use to run Docker on Windows:
      * `docker images`: List all of the images that are available on your computer.
      * `docker ps`: List all of the running containers.
      * `docker stop `: Stop a running container.
      * `docker start `: Start a stopped container.
      * `docker remove `: Remove a container.
      If you are unable to run Docker on AWS, it is possible that you do not have the Docker daemon installed. You can install the Docker daemon using the following command:
      ```
      sudo apt install docker.io
      ```
      Once the Docker daemon is installed, you can start it using the following command:
      ```
      sudo service docker start
      ```
      You can then try running the `docker run` command again

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

      Thanks for information I clearly understanded now

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

    Can u tell me how to write docker file using github url

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

      Here is an example of a Dockerfile that uses a GitHub URL:
      Dockerfile
      FROM python:3.8
      RUN git clone github.com/your-username/your-repo.git /app
      WORKDIR /app
      RUN pip install -r requirements.txt
      CMD ["python", "app.py"]
      This Dockerfile will:
      * Pull the latest version of Python 3.8 from Docker Hub.
      * Clone the GitHub repository your-username/your-repo into the /app directory.
      * Change the working directory to /app.
      * Install the dependencies listed in the requirements.txt file.
      * Run the python app.py command.
      To build the Docker image, you can run the following command:
      Code snippet
      docker build -t your-username/your-repo .
      Once the image is built, you can run it with the following command:
      Code snippet
      docker run your-username/your-repo
      This will start the Python application from the app.py file.
      Here are some additional things to keep in mind:
      * The FROM instruction specifies the base image for the Dockerfile.
      * The RUN instructions execute commands in the Dockerfile.
      * The WORKDIR instruction sets the working directory for the Dockerfile.
      * The CMD instruction specifies the command that will be executed when the Docker image is run.
      I hope this helps

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

      Not sure on this

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

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

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

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

    I m runnung local host and not able to find hello world😢

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

      will need to check the details. Can try some online examples

  • @052widyafadilahs2
    @052widyafadilahs2 Месяц назад

    Can i do this in Windows?

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

      Yes, can check how to get started with Docker on windows.. automationstepbystep.com/

    • @052widyafadilahs2
      @052widyafadilahs2 Месяц назад

      @@RaghavPal Thank You