-->

ABOUT US

Our development agency is committed to providing you the best service.

OUR TEAM

The awesome people behind our brand ... and their life motto.

  • Kumar Atul Jaiswal

    Ethical Hacker

    Hacking is a Speed of Innovation And Technology with Romance.

  • Kumar Atul Jaiswal

    CEO Of Hacking Truth

    Loopholes are every major Security,Just need to Understand it well.

  • Kumar Atul Jaiswal

    Web Developer

    Techonology is the best way to Change Everything, like Mindset Goal.

OUR SKILLS

We pride ourselves with strong, flexible and top notch skills.

Marketing

Development 90%
Design 80%
Marketing 70%

Websites

Development 90%
Design 80%
Marketing 70%

PR

Development 90%
Design 80%
Marketing 70%

ACHIEVEMENTS

We help our clients integrate, analyze, and use their data to improve their business.

150

GREAT PROJECTS

300

HAPPY CLIENTS

650

COFFEES DRUNK

1568

FACEBOOK LIKES

STRATEGY & CREATIVITY

Phasellus iaculis dolor nec urna nullam. Vivamus mattis blandit porttitor nullam.

PORTFOLIO

We pride ourselves on bringing a fresh perspective and effective marketing to each project.

  • Docker Networking via bridge

     

     

    Docker Networking via bridge

     

    Docker Networking 



    Docker networks allow containers to communicate with each other.

    Example :

     

    Frontend Container
            │
            ▼
    Backend Container
            │
            ▼
    Database Container
      




    Without networking:

    ❌ Containers cannot easily communicate.

    With networking:

    ✅ Containers communicate securely.



    In docker networks there are 6 types of networks - 

    1) bridge
    2) host
    3) overlay
    4) ipvlan
    5) macvlan
    6) none



    so steps by steps we will learn each and every docker networks.


    1. Bridge - Its a default network as a bridge and if we will make container and don't make any other networks so its use by default network as a bridge from our host machine.

    So let's see how to verify we have connected through bridge while making container.  if you are followed our docker's blog continuously then you know we have already images  container that we are already uploaded.

    So, here we will run our docker desktop from our system (in windows search bar search docker desktop) are using our first command  

     

    • docker run -it --name server1 ubuntu bash

     

     

    Docker Networking


     

    Here:

    • server1  = Container Name
    • ubuntu   = Image Name
    • bash     = Command to run



    Here a ubuntu server is running even you can verify container name via 

    • docker ps



    Docker Networking


    Lets verify this docker container is connected via internet.

     

     

    Docker Networking

     

     

    So as you can see the old one images and in that container we are facing some problems to apt-get or apt install iputils-ping -y because we are unable to use ping command.

    So we will create new one file, docker images and install manually so follow the steps and do with scratch. 


    Step 1: Create a folder


    networking-dev/
    ├── Dockerfile
    



    Step 2: Create Dockerfile


    So go to your desire directory in your local machine and then create a folder

    mkdir networking-dev

    cd networking-dev  

     

    and inside the folder open vs code editor  so type a file name without any extension.

    code Dockerfile 

    add this command and save it simple.


    FROM ubuntu:24.04
    
    RUN apt-get update && \
        apt-get install -y \
        iputils-ping \
        net-tools \
        iproute2 \
        dnsutils
    
    CMD ["bash"]
    

     

    This installs:

    ping
    ifconfig
    ip
    nslookup
    other networking tools


    Step 3: Build your image


    Go inside the folder containing the Dockerfile: 

     

    • docker build -t atul/networking-dev .


     

     

    Docker Networking

     

     
    Notice the . at the end.

    Docker will:

    • Read the Dockerfile
    • Download Ubuntu 24.04
    • Install ping, net-tools, iproute2, dnsutils
    • Create image atul/networking-dev


    Verify:

    docker images

    You should see:

    REPOSITORY           TAG
    atul/networking-dev  latest

     

     

    Docker Networking

     



    Run container



    Now lets move into our real purpose of this blog docker networking via bridge

    So, here we will run our docker desktop from our system (in windows search bar search docker desktop) are using our first command  

     

    • docker run -it --name server1 atul/networking-dev


    Docker Networking


    Previously we have server1 in container docker desktop so delete it. 

    Inside container test:

    ping google.com
    ifconfig
    ip addr
    nslookup google.com

    All should work.

    • docker ps 


    C:\Users\user\Desktop\app>docker ps
    CONTAINER ID   IMAGE                 COMMAND   CREATED         STATUS         PORTS     NAMES
    98acba8d0340   atul/networking-dev   "bash"    4 minutes ago   Up 4 minutes             server1
    
    C:\Users\user\Desktop\app>
    
    
    


    Verify which network a container is using



    Run:

    • docker inspect server1


    Large output will appear.

    To see only network information:

    • docker inspect server1 --format='{{json .NetworkSettings.Networks}}'



    Output:

    {"bridge":{"IPAddress":"172.17.0.1"}}

    This means:

    Container: server1
    Network: bridge
    IP: 172.17.0.1


    Docker Networking




    Practical Demo



    Create two containers:

    • docker run -dit --name server1  atul/networking-dev
    • docker run -dit --name server2  atul/networking-dev


    Check:


    docker ps


    After creating server in another terminal lets check IP address even try to ping each other

    hostname -I 

    ping 172.17.0.2 


    Docker Networking


    We are able because both are connected with docker network by default bridge.

    Enter server1:

    docker exec -it server1 bash

    Try:

    ping server2

    On the default bridge network, name resolution may not work as expected.

     

    root@98acba8d0340:/# ping server2
    ping: server2: Name or service not known
    root@98acba8d0340:/#
    
    

     

    we are not able to ping because of they are only default network as an IP address.

     A better practice is creating your own network: so for this open new terminal and run this command 

    • docker network create mynetwork



    Docker Networking



    open another terminal and type this command with server3 and --network mynetwork

     

    hostname -I 

    you can see the IP there is -  172.18.0.2 but this is in another class - 18 and previous one are in 17 class



    Docker Networking


    Now we want to connect server 1 with my network mynetwork

    and you can see in server1 having two different class IP

     

     

    Docker Networking


    now we are able to run using name 

     

     

    Docker Networking


     

     

    These are commands that we have used 

    docker network ls
    docker inspect server1
    docker network create mynetwork
    docker run --network mynetwork ...




    Conclusion



    Understanding Dockerfiles, custom image creation, and environment variables is essential for anyone learning Docker, DevOps, Cloud Computing, or System Administration.

    By mastering these concepts, you'll be able to create reusable Docker images, automate deployments, and configure applications efficiently. These skills are widely used in real-world production environments and are frequently asked about in DevOps and System Engineer interviews.




  • How to mount any local machine file or folder with docker container volume

     

    How to mount any local machine file or folder with docker container

     

    Docker Volumes



    What is a Docker Volume?

    A Docker Volume is used to store data permanently, even if the container is deleted.


    Without a volume:

    Container Deleted
          ↓
    Data Deleted
      



    With a volume:

     

    Container Deleted
          ↓
    Data Remains Safe  
    

     

     

    Why Do We Need Volumes?


    Imagine a MySQL container:

    • docker run mysql


    All database data is inside the container.


    If the container is removed:

    • docker rm mysql-container


    Your database is gone. 

     

    Docker local file to docker container


    How to use docker volume inside the docker ?


    First we will create a file or file with code in local machine and then mount with docker and run nodejs code with nodemon and we will see live code's output in docker.

    In our local machine --> go to desktop --> creating new folder --> then open in vs code --> then mount it

    • cd Desktop
    • mkdir app
    • code app



    Mount it 

    • docker run -it node:latest


     

    How to mount any local machine file or folder with docker container volume

     

     Now we will mount from in our local machine's folder that we have created a folder name is app wtih node folder. so for this you can check our folder is there - docker container ls -a 

     

     

    How to mount any local machine file or folder with docker container volume

     

     use this command - docker run -it -v 

     

    • -it -> interactive mode
    • -v -> volume (with which you can attach any volume from your own machine to our docker container).
    • copy of address of my folder 
    • :   -> then mount with my container's address 

     

     

    How to mount any local machine file or folder with docker container volume

     

    then you can see the above image and if we type uname there is linux and we will go docker container's directory cd home then ls for list directory.

     cd app

    ls

    there is a file called index.js  

    index.js file is coming from our local machine. 

     

     

    How to mount any local machine file or folder with docker container volumeHow to mount any local machine file or folder with docker container volume

     you can check here cat index.js 

     

     

    How to mount any local machine file or folder with docker container volume

     

    Now we will nodemon in our container and will run our node js file and if we try to change from our local machine then it will effect in our container where as we did run nodemon index.js file.

    so first we will install nodemon as a globally.

    npm install -g nodemon

      

     

    How to mount any local machine file or folder with docker container volume

     

    then we will run nodemon index.js  

     

     

    How to mount any local machine file or folder with docker container volume

     

     if we change anything in our file index.js in our local machine then it will changes effect here because both are pointing same memory location and so if you are unable to changes anything as a output so run this command.

    nodemon -L index.js 

     

     

    How to mount any local machine file or folder with docker container volume



    Second way to create docker volume

     

    This is the way to mount any file to docker container and now we will try to create a docker volume so for this  type this command and as well as open docker desktop that we have installed in previous blog article - check out Here - 

    CLICK HERE

    docker volume create data 

     

    data -> is the name of volume 

     

      

    How to mount any local machine file or folder with docker container volume


    Now you can check here if we type this command - docker volume ls

    here it is showing  local as a our Driver local machine 

    and

    Volume name as a data that we have created just now 

    Now we will attach our data volume to our docker container 

    use this command - 

    docker run -it -v data:/data node bash 

    Here you can check here is a folder called as data so go to this data folder and again type ls command and nothing is there 


    How to mount any local machine file or folder with docker container volume

    so we will create a file or folder atul.js for data volume and you can use this command mkdir atul.js and type again ls atul.js



    How to mount any local machine file or folder with docker container volume


    so now we can say that what we have created a data volume that its attached with our local file. so for this you see this

    open another terminal and type this command - 

    docke run -it -v data:/myapp ubuntu 

    go to this this directory

    cd myapp

    ls

    and you can see that there is same atul.js is there   



    How to mount any local machine file or folder with docker container volume


    lets say if we create a another file or folder in previous container terminal so we are able to see in another same file in our data volume because we have create a volume called as data and each and every container file pushed in volume data.

     

     

    How to mount any local machine file or folder with docker container volume


    So we have created a two different container and attached with data volume and now you can see the result.


     

     

    How to mount any local machine file or folder with docker container volume


    Conclusion



    Understanding Dockerfiles, custom image creation, and environment variables is essential for anyone learning Docker, DevOps, Cloud Computing, or System Administration.

    By mastering these concepts, you'll be able to create reusable Docker images, automate deployments, and configure applications efficiently. These skills are widely used in real-world production environments and are frequently asked about in DevOps and System Engineer interviews.



  • Dockerfile, Custom Images, and Environment Variables Explained for Beginners

     

    Dockerfile, Custom Images, and Environment Variables Explained for Beginners

     

     

    Dockerfile, Custom Images, and Environment Variables Explained for Beginners



    Docker is one of the most important technologies in modern DevOps, cloud computing, and software deployment. After learning Docker Images and Containers, the next step is understanding Dockerfiles, building custom images, and using environment variables. 
    Learn Dockerfile, custom Docker image creation, and environment variables with practical examples. A beginner-friendly Docker guide for DevOps and System Engineers.

    In this guide, you'll learn these concepts with practical examples.


    What is a Dockerfile?



    A Dockerfile is a text file that contains instructions for building a Docker image. Instead of manually configuring containers every time, you can define all steps inside a Dockerfile and create reproducible images.

    Example:

     

    dockerfile
    FROM nginx
    COPY index.html /usr/share/nginx/html/index.html
      




    In this example:

    • * FROM nginx uses the Nginx image as the base image.
    • * COPY copies a webpage into the Nginx web server directory.


    Docker reads these instructions and builds a custom image.



     Common Dockerfile Instructions



    FROM

    • Specifies the base image.
    • FROM ubuntu



     WORKDIR

    Sets the working directory inside the container.


    • WORKDIR /app



     COPY

    Copies files from the host machine into the container.

    • COPY . .



    RUN

    Executes commands during image creation.


    • RUN npm install



    CMD

    Defines the default command executed when the container starts.


    • CMD ["node","server.js"]



    Building Custom Docker Images

    Let's create a simple custom image.

     

    Project Structure

     

    text
    project/
    │
    ├── Dockerfile
    ├── index.html
    
    

     



    Dockerfile


    • FROM nginx
    • COPY index.html /usr/share/nginx/html/index.html




    Build the Image



    Run the following command inside the project directory:

    • docker build -t mywebsite . 

     

     
    Explanation:
     

    • docker build creates a Docker image.
    • -t assigns a tag or image name.
    • mywebsite is the image name.
    • .  represents the current directory.



     

    Verify the Image


    • docker images



    You should see:


    • REPOSITORY
    • mywebsite




    Run the Custom Image


    • docker run -d -p 8080:80 mywebsite


    Open:


    • http://localhost:8080


    Your custom webpage should now be visible in the browser.

     

     

     

    What Are Environment Variables?



    Environment variables allow you to pass configuration values to containers without modifying application code.

    This makes applications easier to manage and deploy.

    Example:


    • docker run -e APP_NAME=HackingTruth nginx



    Here:

     

    • APP_NAME=HackingTruth



    is an environment variable available inside the container.


     

    Multiple Environment Variables

     

     

    docker run \
    -e DB_HOST=localhost \
    -e DB_USER=root \
    -e DB_PASSWORD=password \
    myapp
    
    

     

    This approach is commonly used for:

    • * Database credentials
    • * API keys
    • * Application settings
    • * Deployment configuration



    Defining Environment Variables in Dockerfile


    You can also define variables directly inside a Dockerfile.


    • FROM ubuntu
    • ENV APP_NAME=HackingTruth
    • ENV VERSION=1.0



    Build the image:

    • docker build -t myapp .



    Run the container:

    • docker run myapp



    The environment variables will be available inside the container.


    Why Use Dockerfiles and Environment Variables?



    Dockerfiles provide:

    • * Consistent deployments
    • * Reproducible environments
    • * Easier automation



    Environment variables provide:

    • * Better configuration management
    • * Improved security practices
    • * Easier deployment across environments


    Together, they form the foundation of modern containerized applications.


    Conclusion



    Understanding Dockerfiles, custom image creation, and environment variables is essential for anyone learning Docker, DevOps, Cloud Computing, or System Administration.

    By mastering these concepts, you'll be able to create reusable Docker images, automate deployments, and configure applications efficiently. These skills are widely used in real-world production environments and are frequently asked about in DevOps and System Engineer interviews.



  • docker-installation-images-containers-port-mapping-guide


    docker-installation-images-containers-port-mapping-guide

     


    Docker is a platform that allows developers and system administrators to package applications and their dependencies into containers. Containers are lightweight, portable and run consistently across different computing environment.



    Docker Learning Path for You



    Week 1

    • Install Docker 
    • Containers vs Images 
    • Pull images 
    • Run containers 
    • Port mapping 



    Week 2 

    • Dockerfile 
    • Build custom images 
    • Environment variables 



    Week 3 


    • Docker Volumes 
    • Docker Networks 
    • Multi-container 
    • applications 



    Week 4 

    • Docker Compose 
    • Deploy React/Node applications 
    • Container troubleshooting 



    But we will start from week 1 module and try to answer the interview level question also 

     

     Install Docker 

     

     For installing the docker via docker-desktop and via wsl linux. you can choose any of the them or both so check it here for previously we have done this part and many things you can learn from other blog article.

     

    Click Here 

     

    Containers vs Images


    This is one of the most common Docker interview questions.


    • Docker Image


    An Image is like a blueprint or template.



    Think of it like:

    Windows ISO File
         ↓
    Install Windows
         ↓
    Running Windows OS
      



    Similarly:
    Docker Image
        ↓
    Run Image
        ↓
    Docker Container
    




    Examples of Images:

    • nginx
    • ubuntu
    • mysql
    • node



    View downloaded images:

    • docker images




    Example output:


    docker-installation-images-containers-port-mapping-guide

     

    Docker Container



    A Container is a running instance of an image or Containers are standardized software units that package code and dependencies together, ensuring an application runs quickly and reliably across any computing environment. 


    Example:

    • docker run nginx


    Docker:

    • Checks for nginx image
    • Downloads it if missing
    • Creates container
    • Starts container


    View running containers:  list running container and verify 

    docker ps

     

     docker-installation-images-containers-port-mapping-guide

     

     

     Interview Answer


    What is the difference between Image and Container?



    Image


    • Read-only template
    • Used to create containers
    • Similar to an ISO file



    Container

    • Running instance of an image
    • Has its own process and network
    • Similar to an installed/running operating system

     

     

    Pull Images



    What is Pull?

    Downloading an image from Docker Hub to your local machine.

    Example:

    docker pull nginx


    Docker downloads:

    • nginx:latest
    • Pull Ubuntu
    • docker pull ubuntu



    Check downloaded images:

    • docker images
    • Pull Specific Version
    • docker pull nginx:1.27




    Why?


    In production we often use specific versions instead of latest.


    Interview Question



    What does docker pull do?

    Answer:

    docker pull downloads an image from a registry such as Docker Hub to the local Docker host.

    like this hello-world repo or registry -





    docker-installation-images-containers-port-mapping-guide



     Port Mapping


    This is extremely important.



    Without Port Mapping


    Run nginx:

    • docker run nginx
    • Container runs internally.
    • You cannot access it from your browser.


    With Port Mapping

    • docker run -d -p 8080:80 nginx






    Meaning:

    • Host Machine Port = 8080
    • Container Port = 80



    Visualization:


    Your Laptop
    localhost:8080
            │
            ▼
    Docker Container
    Port 80 (Nginx)



    Test


    Open browser:

    http://localhost:8080

    You should see:

    Welcome to nginx!



    docker-installation-images-containers-port-mapping-guide






    Another Example


    Node.js app running on port 3000 inside container:

    • docker run -d -p 3000:3000 myapp



    Meaning:

    • Host 3000 → Container 3000
    • Check Port Mapping
    • docker ps



    Example:

    PORTS

    • 0.0.0.0:8080->80/tcp



    Meaning:

    Host Port 8080
               ↓
    Container Port 80


     

     

    Commands You Must Remember



    Pull image:

    • docker pull nginx


    List images:

    • docker images


    Run container:

    • docker run nginx


    Run in background:

    • docker run -d nginx


    Port mapping:

    • docker run -d -p 8080:80 nginx


    Running containers:

    • docker ps



    All containers:

    • docker ps -a





    Before moving to Week 2, make sure you can confidently explain:

    ✅ What is Docker?
    ✅ What is an Image?
    ✅ What is a Container?
    ✅ What is Docker Hub?
    ✅ What is docker pull?
    ✅ What is port mapping?
    ✅ Difference between docker ps and docker images?
    ✅ Meaning of 8080:80?

     

    Disclaimer



    All tutorials are for informational and educational purposes only and have been made using our own routers, servers, websites and other vulnerable free resources. we do not contain any illegal activity. We believe that ethical hacking, information security and cyber security should be familiar subjects to anyone using digital information and computers. Hacking Truth is against misuse of the information and we strongly suggest against it. Please regard the word hacking as ethical hacking or penetration testing every time this word is used. We do not promote, encourage, support or excite any illegal activity or hacking. 
     
     
     
     
     
  • docker-images-vs-containers-complete-beginners-guide

     

    docker-images-vs-containers-complete-beginners-guide

     

    docker-images-vs-containers-complete-beginners-guide


    What is the docker, and how would you use it in a system engineering role ?

    Docker is a platform that allows developers and system administrators to package applications and their dependencies into containers. Containers are lightweight, portable and run consistently across different computing environment.


    How docker is used in system engineering:

    1. Containerization: Docker packages an application with all its dependencies into a single container, which can be run on any system that supports docker. This simplifies deployment and eliminate dependency conflicts.

    2. Environment Isolation: Each containers is isolated, providing a consistent environment for applications regardless of the underlying host system. This helps with environment replication across development, stagging and production.

    3. CI/CD pipelines: (Continuous Integration and Continuous Delivery/Development) Docker containers are widely used in CI/CD  pipelines to ensure consistent testing, building and deployment environment.

    4. Scalability: Dockers containers can be easily scaled up or down in a Kubernetes or docker swarm environment.




    Core components of Docker



    It is responsible for the overall functioning of the docker platform and docker engine is a client-server based application and consists of 3 main components.

    - Server
    - REST API
    - Client


    - Server -> The server runs a daemon known as dockerd (Docker Daemon), which is nothing but a process. It is responsible for creating and managing docker images, containers, networks and volumes on the Docker platform.

    - REST API - The REST API specifies how the applications can interact with the server and instruct it to get their job done.

    - The client is nothing but a command line interface, that allows users to interact with docker using the commands.




    Docker Terminology 


    Docker Images and Docker containers are the two essential things that you will come across daily while working with docker.

    In simple terms, a docker image is a template that contains the application, and all the dependencies required to run that application on docker.

    On the other hand, as started earlier, a docker container is a logical entity. In more precise terms, it is a running instance of the docker image.


    What is Docker Hub? 


    Docker hub is the official online repository where you could find all the docker images that are available for us to use also allows us to store and distribute our custom images as well if we wish to do so. We could also make them either public or private, based on our requirements.


    What is Docker image?

    Docker image is actually an executable file that file inside instruction for which types of container we should make so using one image we can create multiple container.

    Image is basically like a static screenshot or static snapshot of what the code and the dependencies or what the local development environment look like.

    The relation between Docker and Container like the same as Class (class - how look like object create a blueprint of code) and Object in between of relation.

    Docker image is giving a blue print of how container look like in MAC, Linux, Windows.


    Container 


    Docker is platform or services that useful for creating a container. container i

    • Portable - Portable means we can share data one machine to another machine is become to easier share code as well as dependencies with their development team.
    • Lightweight - Lightweight means easier to build, update and destroy and if we want install extra addon dependencies then we can install in same container.



    OR

    why we make container so what should i do for making container ?


    • Containers are standardized software units that package code and dependencies together, ensuring an application runs quickly and reliably across any computing environment.

     

    after making Docker Container and add some dependencies or else so we should make again docker image ?



    Yes, you need to create a new image if you want to save those changes permanently. Containers are temporary and disposable. Any changes you make directly inside a running container will be lost forever if that container is stopped, deleted, or restarted.


    You have two main ways to handle this, depending on your goal:

     

    Method: Save the Live Container (Quick Fix)



    If you spent a lot of time configuring a running container manually and do not want to lose your work immediately, you can take a snapshot of it.

    Find your running container ID:

    • bashdocker ps


    Use code with caution.Commit the changes to create a brand new image directly from that running container:

    • bashdocker commit CONTAINER_ID your-new-image-name

     

     

    How to install and run docker desktop

     

    Step 1: Check Requirements

    Option A: Docker Desktop (Recommended)

    Requirements:

    • Windows 10 64-bit
    • At least 4 GB RAM (8+ GB recommended)
    • Hardware virtualization enabled in BIOS
    • WSL 2 support


    First, open PowerShell as Administrator and check:

    systeminfo


    Look for:

    • Hyper-V Requirements: Yes
    • Virtualization Enabled In Firmware: Yes


    Step 2: Enable WSL 2

    Open PowerShell as Administrator:

    wsl --install





    After completing task 1 like according to image 1(above image) it will ask for reboot the system then after rebooting the system (according to image 2 - below) it will automatically popup a cmd and run this wsl linux.



    docker-images-vs-containers-complete-beginners-guide




    Restart your PC.

    Verify:

    wsl --status


    You should see WSL version 2 installed.

     

     


     

    Step 3: Download Docker Desktop



    Go to:

    Docker Desktop for Windows

    Download the installer.



    Step 4: Install Docker Desktop



    Run the installer.

    During installation:

    ✅ Use WSL 2 instead of Hyper-V (recommended)
    ✅ Add Docker Desktop shortcut

    Restart if prompted.

     

     

     

    docker-images-vs-containers-complete-beginners-guide

     

    Step 5: Start Docker



    Launch Docker Desktop.

    Wait until Docker reports:

    • Docker Engine running



    docker-images-vs-containers-complete-beginners-guide



    Step 6: Verify Installation



    Open PowerShell:

    • docker --version


    Example output:

    • Docker version 28.x.x


    Check Docker engine:

    • docker info

     

    NOTE -  some useful URLs you can check here  

     

    • https://hub.docker.com/_/hello-world
    • https://app.docker.com/accounts/whoiskumaratul

     

    Step 7: Run Your First Container

     

    To run this your first container hello world docker from URL - you can check here - Docker Hello World 


    Test Docker with:

    • docker run hello-world


    If successful, you'll see a welcome message.


    So, for this we will pull first - docker pull hello-world

      

     

    docker-images-vs-containers-complete-beginners-guide

     

     Then run container and you can see in the docker desktop UI there will be create docker image and docker container 

     

    • docker run hello-world

     

     

    docker-images-vs-containers-complete-beginners-guide

     

     

    Docker Ubuntu

    When we installed wsl ubuntu you have noticed in your local directory - linux section is there 

     

     

    docker-images-vs-containers-complete-beginners-guide

     

     you can run this via Linux ubuntu - try this command docker run -it ubuntu 

     -it -> we want to run in interactive mode

     

     

    docker-images-vs-containers-complete-beginners-guide

     

     Now we can check directory and create new folder, file because we are in linux directory 

     

     

    docker-images-vs-containers-complete-beginners-guide

     

    Stop container

    • docker stop <container_id>



    Remove container

    • docker rm <container_id>



    Remove image

    • docker rmi <image_name>

     

     

     


     

    Step 8: Run an Nginx Web Server



    Pull and run Nginx:

    • docker run -d -p 8080:80 nginx

     

     

     

    docker-images-vs-containers-complete-beginners-guide

     

     

    Verify:

    • docker ps




      

    Open browser:

    • http://localhost:8080


    You should see the Nginx welcome page.

     

     

    docker-images-vs-containers-complete-beginners-guide

     

    Essential Docker Commands for Interviews



    List running containers

    • docker ps



    List all containers

    • docker ps -a



    List images

    • docker images



    Stop container

    • docker stop <container_id>



     

    docker-images-vs-containers-complete-beginners-guide

     

     

     

     

    Remove container

    • docker rm <container_id>



    Remove image

    • docker rmi <image_name>

     

     

    Disclaimer



    All tutorials are for informational and educational purposes only and have been made using our own routers, servers, websites and other vulnerable free resources. we do not contain any illegal activity. We believe that ethical hacking, information security and cyber security should be familiar subjects to anyone using digital information and computers. Hacking Truth is against misuse of the information and we strongly suggest against it. Please regard the word hacking as ethical hacking or penetration testing every time this word is used. We do not promote, encourage, support or excite any illegal activity or hacking.


  • WHAT WE DO

    We've been developing corporate tailored services for clients for 30 years.

    CONTACT US

    For enquiries you can contact us in several different ways. Contact details are below.

    Hacking Truth.in

    • Street :Road Street 00
    • Person :Person
    • Phone :+045 123 755 755
    • Country :POLAND
    • Email :contact@heaven.com

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation.