-->

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.

Showing posts with label networking. Show all posts
Showing posts with label networking. Show all posts
  • switch-trunking lab in Cisco Packet Tracer

     

    switch-trunking lab in Cisco Packet Tracer



    We can recreate this exact switch-trunking lab in Cisco Packet Tracer. The key concept is:

    Access ports connect end devices to one VLAN. Trunk port carries multiple VLANs between switches.

    One small correction in the image: the SW2 configuration appears to show vlan 18 and vlan 38, but based on the topology it should be VLAN 10, 20, and 30.


    why a company needs trunking.


    Let's forget Packet Tracer for a moment and look at an actual corporate office.

    Imagine your Cubic office

    Suppose an office has 200 employees and one switch has 48 ports.
    The company doesn't want every device to be in the same network.

    They may create:

    • VLAN 10 → Employees
    • VLAN 20 → IT/Servers
    • VLAN 30 → Guest Wi-Fi
    • VLAN 40 → CCTV
    • VLAN 50 → Voice/IP Phones


    So physically you might have:


    switch-trunking lab in Cisco Packet Tracer


    Now comes the important question:



    Why do we need a TRUNK?


    Imagine SW1 and SW2 are on different floors.

    https://www.kumaratuljaiswal.in/2026/05/router-switch-integration-in-cisco.html




    But users on both floors need access to the same VLANs.

    For example:

     
    SW1                          SW2
    
    Employee VLAN 10 ─────────── VLAN 10
    IT VLAN 20      ─────────── VLAN 20
    Guest VLAN 30   ─────────── VLAN 30
    Voice VLAN 40   ─────────── VLAN 40
    



    Do we need four physical cables?


    SW1 ================= SW2   VLAN 10
    
    SW1 ================= SW2   VLAN 20
    
    SW1 ================= SW2   VLAN 30
    
    SW1 ================= SW2   VLAN 40
    
    
    



    That would be inefficient.

    Instead, we use one trunk link:


    switch-trunking lab in Cisco Packet Tracer

    That's the main reason for trunking.

    1. Create the topology


    In Packet Tracer, add:

    2 × 2960 switches
    4 × PCs


    Arrange them:  

     

     

    switch-trunking lab in Cisco Packet Tracer

     More precisely:

     

    switch-trunking lab in Cisco Packet Tracer


    Connections

     


         
     Device	   Port	               Device	     Port	Type
      PC1	   FastEthernet0	SW1	     Fa0/1	Copper Straight-Through
      PC2	   FastEthernet0	SW1	     Fa0/2	Copper Straight-Through
      SW1	   Fa0/24	        SW2          Fa0/24	Copper Cross-Over*
      PC3	   FastEthernet0	SW2	     Fa0/1	Copper Straight-Through
      PC4	   FastEthernet0	SW2	     Fa0/2	Copper Straight-Through
    
    
                             www.kumaratuljaiswal.in
    
    

     

    2. Create VLANs on SW1


    Click SW1 → CLI. 

     

    enable
    configure terminal
    
    vlan 10
    name VLAN10
    exit
    
    vlan 20
    name VLAN20
    exit
    
    vlan 30
    name VLAN30
    exit
    

     

    So SW1 now has:

    • VLAN 10
    • VLAN 20
    • VLAN 30 

     

    3. Configure PC1 port as VLAN 10


    PC1 is connected to SW1 Fa0/1.


    This means:

    interface fa0/1
    switchport mode access
    switchport access vlan 10
    exit
    
      

      PC1
       |
      Fa0/1
       |
      VLAN 10 

       

      4. Configure PC2 port as VLAN 20


      interface fa0/2
      switchport mode access
      switchport access vlan 20
      exit
      



      Now:

      PC1 → VLAN 10
      PC2 → VLAN 20 

       

      5. Configure SW1-to-SW2 as a trunk


      This is the most important part.

      On SW1: 

      interface fa0/24
      switchport mode trunk
      switchport trunk allowed vlan 10,20
      exit
      
      


      Notice:

      allowed vlan 10,20

      We are not allowing VLAN 30.

      Therefore:

      • VLAN 10 → Allowed
      • VLAN 20 → Allowed
      • VLAN 30 → Blocked 

       

       

      6. Configure SW2


      Go to SW2 → CLI.

      Create the same VLANs:
       

      enable
      configure terminal
      
      vlan 10
      name VLAN10
      exit
      
      vlan 20
      name VLAN20
      exit
      
      vlan 30
      name VLAN30
      exit
      

       


      7. Configure PC3 as VLAN 10


      PC3 is connected to SW2 Fa0/1:
       

      interface fa0/1
      switchport mode access
      switchport access vlan 10
      exit
      
      

       

      8. Configure PC4 as VLAN 20

      interface fa0/2
      switchport mode access
      switchport access vlan 20
      exit
      

       

      9. Configure SW2 trunk 

      interface fa0/24
      switchport mode trunk
      switchport trunk allowed vlan 10,20
      exit
      

       

      Now both sides of the trunk agree: 

      SW1 Fa0/24
            ||
            ||  802.1Q TRUNK
            ||
      SW2 Fa0/24


      Allowed VLANs:
      10
      20

      VLAN 30:
      NOT ALLOWED 

       



      10. Configure PC IP addresses


      Go to each PC:


      PC → Desktop → IP Configuration


      PC1

      • IP Address: 192.168.10.10
      • Subnet Mask: 255.255.255.0


      PC2

      • IP Address: 192.168.20.10
      • Subnet Mask: 255.255.255.0


      PC3

      • IP Address: 192.168.10.20
      • Subnet Mask: 255.255.255.0


      PC4

      • IP Address: 192.168.20.20
      • Subnet Mask: 255.255.255.0


      You don't need a default gateway for this particular lab because we're only testing Layer-2 communication within the same VLAN.


      11. Test the important part


      From PC1:

      • ping 192.168.10.20

      Expected:

      • Reply from 192.168.10.20


      Why? 

       

      PC1
      VLAN 10
         ↓
      SW1
         ↓
      TRUNK
         ↓
      SW2
         ↓
      VLAN 10
         ↓
      PC3
      

       

      So PC1 → PC3 should work.

      Now from PC2:

      ping 192.168.20.20

      Expected:

      Reply from 192.168.20.20

      Because both are VLAN 20. 

       

      12. Test between different VLANs


      From PC1:

      ping 192.168.20.20

      This should fail.

      Why?

      PC1 → VLAN 10
                   X
               VLAN 20

      A Layer-2 switch does not route between VLAN 10 and VLAN 20. You would need a router or Layer-3 switch for inter-VLAN routing.


      13. Verify the VLANs


      On SW1:

      • show vlan brief


      You should see something similar to:

      VLAN Name       Status    Ports
      
      10   VLAN10     active    Fa0/1
      20   VLAN20     active    Fa0/2
      30   VLAN30     active
      

         

        On SW2:

        • show vlan brief


        You should see

        10   VLAN10     active    Fa0/1
        20   VLAN20     active    Fa0/2
        30   VLAN30     active  
          

         

        14. Verify the trunk


        On either switch:

        • show interfaces trunk


        You should see Fa0/24 as a trunk.

        Most importantly, the allowed VLAN list should contain:

        10,20

        and not 30.

        You can also check:

        • show interfaces fa0/24 switchport


        Look for:

        Administrative Mode: trunk
        Operational Mode: trunk

        and the allowed VLANs. 

         

        The three tests you should remember for your System Engineer interview

         

          
        | Test          | Expected                              |
        | ------------- | ------------------------------------- |
        | PC1 → PC3     | ✅ Works — same VLAN 10                |
        | PC2 → PC4     | ✅ Works — same VLAN 20                |
        | PC1 → PC2/PC4 | ❌ Fails — different VLANs, no routing |
        
          


        And the important interview explanation is:

        “I configured Fa0/1 and Fa0/2 as access ports for VLAN 10 and VLAN 20. I configured the inter-switch Fa0/24 link as an 802.1Q trunk and restricted the allowed VLANs to 10 and 20. VLAN 30 exists on the switches but is not permitted across the trunk.” 

         

        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-multi-container-applications-guide


        docker-multi-container-applications-guide

         

        Multi-Container Applications in Docker: A Beginner's Guide



        Modern applications rarely run inside a single container. In real-world production environments, different components of an application are separated into multiple containers. This approach improves scalability, maintainability, security, and performance.

        In this guide, you'll learn what multi-container applications are, why they are important, and how Docker Networks and Docker Volumes help containers communicate and store data efficiently.

         

        What Are Multi-Container Applications?



        A multi-container application consists of multiple Docker containers working together to provide a complete service.

        For example, a typical web application may have:


        • React Frontend
        • Node.js Backend API
        • MongoDB Database



        Instead of running everything inside one container, each service runs in its own container. 

         

        React Frontend
              │
              ▼
        Node.js Backend
              │
              ▼
        MongoDB Database
        
        



        This architecture follows the principle of separation of concerns, making applications easier to manage and scale.

         

         

        Example Multi-Container Architecture



        A typical Docker application may look like this:

        Container 1: Frontend
        Technology: React
        Port: 3000


        Container 2: Backend
        Technology: Node.js
        Port: 5000


        Container 3: Database
        Technology: MongoDB
        Port: 27017

         

         

        Frontend Container (React)
                 │
                 ▼
        Backend Container (Node.js)
                 │
                 ▼
        Database Container (MongoDB)
        

         

         
        All containers communicate through a Docker Network.

         


        Why Use Multiple Containers?



        Using separate containers provides several advantages:

        Better Scalability

        You can scale only the service that needs additional resources.


        Example:

        • 1 MongoDB container
        • 3 Backend containers
        • 2 Frontend containers


         

        Easier Maintenance



        If the backend crashes, you can restart only the backend container without affecting the frontend or database.



        Improved Security


        Each service runs in an isolated environment.


        Independent Updates



        Frontend, backend, and database can be updated separately. 

         

        Creating a MongoDB Container



        Start a MongoDB container:

        docker run -d --name mongodb mongo

        Docker downloads the MongoDB image and runs it in the background.

         

        Creating a Custom Docker Network


        Before connecting containers, create a network:

        docker network create mynetwork


        Verify:

        docker network ls

        Docker networks allow containers to communicate using container names instead of IP addresses.

        Starting the Backend Container



        Run the backend container on the custom network:

        • docker run -d --name backend --network mynetwork node




        The backend can now communicate with other containers attached to the same network.


        Starting the Frontend Container

        Run the frontend container:

        • docker run -d --name frontend --network mynetwork react-app




        Now all services are connected through the Docker network.

        Docker Volumes for Persistent Data
        Containers are temporary by nature. If a database container is deleted, its data may be lost.
        Docker Volumes solve this problem.



        Create a Volume

        • docker volume create mydata



        List available volumes:

        • docker volume ls
        • Attach Volume to a Container
        • docker run -v mydata:/app/data nginx


         
        Benefits of Docker Volumes:

        • Persistent storage
        • Data survives container deletion
        • Easy backup and migration
        • Real-World Example: hackingtruth.org


        Imagine hosting hackingtruth.org using Docker.

         

        Application Stack:


        • React Frontend
        • Node.js Backend
        • MongoDB Database

         

        Production Architecture:

         

        Frontend Container
                │
                ▼
        Backend Container
                │
                ▼
        MongoDB Container
        

         



        Supporting Components:



        Docker Network → Container communication
        Docker Volume → Database storage
        Multi-Container Architecture → Service separation


        This setup closely resembles how modern applications are deployed in cloud environments.

         

         

        Essential Commands



        Create Volume
        docker volume create mydata


        List Volumes
        docker volume ls


        Create Network
        docker network create mynetwork


        List Networks
        docker network ls


        Run Container with Volume
        docker run -v mydata:/app/data nginx


        Run Container on a Network
        docker run --network mynetwork nginx


         

        Benefits of Multi-Container Applications


        • Better scalability
        • Easier troubleshooting
        • Improved security
        • Independent deployments
        • Simplified maintenance
        • Production-ready architecture


        These advantages make multi-container applications the preferred approach in modern DevOps and cloud-native environments.



        Conclusion



        Multi-container applications are a fundamental concept in Docker and modern application deployment. By separating frontend, backend, and database services into individual containers, organizations achieve better scalability, reliability, and maintainability.

        Combined with Docker Networks and Docker Volumes, multi-container architecture provides the foundation for deploying professional-grade applications in production environments. Learning these concepts is essential for anyone pursuing a career in DevOps, Cloud Engineering, System Administration, or Software Development.

         

         

      • docker-compose-react-node-deployment-troubleshooting

         

        docker-compose-react-node-deployment-troubleshooting

         

         

         

        Docker Compose, React & Node.js Deployment, and Container Troubleshooting Guide


        As applications grow, managing multiple Docker containers manually becomes difficult. Imagine starting separate containers for React, Node.js, MongoDB, Redis, and Nginx every time you want to run your project.

        Docker Compose solves this problem by allowing you to define and manage multi-container applications using a single configuration file.

        In this guide, you'll learn Docker Compose, deploying React and Node.js applications, and common container troubleshooting techniques.


        What is Docker Compose?


        Docker Compose is a tool that allows you to define and run multiple Docker containers using a single YAML configuration file.

        Instead of running multiple commands manually:

          
        docker run ...
        docker run ...
        docker run ...
        
          



        You can define everything inside a single file:

        docker-compose.yml

        and start all services with one command. 

         

         

        Why Use Docker Compose?



        Benefits include:

        • Simplified container management
        • Easy multi-container deployments
        • Better configuration management
        • Consistent development environments
        • Faster application startup


        Docker Compose is commonly used for:

        • React Applications
        • Node.js APIs
        • MongoDB Databases
        • Redis Caching
        • Nginx Reverse Proxies

         

         

        Understanding docker-compose.yml


        A basic Docker Compose file looks like this:


        In this example:

        frontend runs the React application
        backend runs the Node.js API
        database runs MongoDB

        All services are automatically connected through an internal Docker network.

         

        version: '3'
        
        services:
          frontend:
            image: react-app
        
          backend:
            image: node-app
        
          database:
            image: mongo
        
        

         

         

         In this example:

        • frontend runs the React application
        • backend runs the Node.js API
        • database runs MongoDB


        All services are automatically connected through an internal Docker network. Learn Docker Compose, deploy React and Node.js applications, and master container troubleshooting with practical examples. A beginner-friendly guide for DevOps and System Engineers.

        Starting Docker Compose


        Run:

        • docker compose up


        Docker will:

        • Create networks
        • Create containers
        • Start services
        • Connect containers


        To run in the background:

        • docker compose up -d
        • Stopping Docker Compose


        Stop all services:

        • docker compose down


        Docker removes containers and networks created by Compose.

         

         Deploying a React Application

          
        FROM node:22
        
        WORKDIR /app
        
        COPY package*.json ./
        
        RUN npm install
        
        COPY . .
        
        EXPOSE 3000
        
        CMD ["npm","start"]
          


        Suppose you have a React application.

        Create a Dockerfile:


        Build the image:

        • docker build -t react-app .


        Run the container:

        • docker run -d -p 3000:3000 react-app


        Open:

        • http://localhost:3000


        Your React application should now be accessible.

         

        Deploying a Node.js Application



        Create a Dockerfile:



        Build the image:

          
          FROM node:22
        
        WORKDIR /app
        
        COPY package*.json ./
        
        RUN npm install
        
        COPY . .
        
        EXPOSE 5000
        
        CMD ["node","server.js"]
          

        • docker build -t node-app .


        Run the application:

        • docker run -d -p 5000:5000 node-app


        Access:

        • http://localhost:5000

         

        Deploying React, Node.js, and MongoDB Together



        A production application often contains:



        Docker Compose makes managing these services much easier.

        Example:

         

        React Frontend
               │
               ▼
        Node.js Backend
               │
               ▼
        MongoDB Database
        

         

         
        Start everything:

        docker compose up -d

        Now all services run together.

         

        version: '3'
        
        services:
          frontend:
            image: react-app
            ports:
              - "3000:3000"
        
          backend:
            image: node-app
            ports:
              - "5000:5000"
        
          mongodb:
            image: mongo
            ports:
              - "27017:27017"
        

         

         

        Container Troubleshooting


        Troubleshooting is an essential Docker skill for System Engineers and DevOps Engineers.

        Check Running Container


        • docker ps


        View all containers:

        • docker ps -a 

         

         

        Check Container Logs


        Logs help identify startup issues.

        docker logs container_name

        Example:

        • docker logs backend


        Access Container Shell



        Enter a running container:

        • docker exec -it container_name bash


        Example:

        • docker exec -it backend bash


        This is useful for checking:

        • Application files
        • Environment variables
        • Network connectivity
        • Installed packages

         

         

        Inspect Container Details


        View container configuration:

        docker inspect container_name

        This displays:

        • IP Address
        • Volumes
        • Networks
        • Environment Variables
        • Mount Points
        • Monitor Resource Usage


        Check CPU and Memory:

        • docker stats


        Useful for identifying performance bottlenecks.

         

         Restart a Container


        docker restart container_name

        Example:

        • docker restart backend

         

        Common Docker Issues


        Port Already in Use

        Error:

        • Bind for 0.0.0.0 failed


        Solution:

        • docker ps


        Find the conflicting container and stop it.

         

        Container Exits Immediately



        Check logs:

        • docker logs container_name



        Usually caused by:

        • Incorrect CMD
        • Missing dependencies
        • Application errors
        • Cannot Access Application



        Verify:

        • docker ps



        Check:

        • Port mapping
        • Firewall settings
        • Container status 

         

        Network Communication Issues


        Inspect network:

        • docker network ls
        • Inspect container:
        • docker inspect container_name
        • Ensure containers are connected to the same Docker network.



        Essential Commands


        Start Compose:

        • docker compose up -d
        • Stop Compose:
        • docker compose down
        • View Containers:
        • docker ps
        • View Logs:
        • docker logs container_name
        • Enter Container:
        • docker exec -it container_name bash
        • Inspect Container:
        • docker inspect container_name
        • Monitor Resources:
        • docker stats

         


        Conclusion



        Docker Compose simplifies the management of multi-container applications by allowing developers and system administrators to define services in a single configuration file.

        Combined with React, Node.js, and MongoDB deployments, Docker Compose enables efficient application management and scalable infrastructure. Understanding container troubleshooting techniques further prepares you for real-world DevOps, Cloud Engineering, and System Administration roles.

        Mastering Docker Compose and troubleshooting skills is a significant step toward becoming a proficient System Engineer or DevOps Engineer.

         

         

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



      • How to identify my wbs chargecode in powershell windows 11

         

        How to identify my wbs chargecode in powershell windows 11


        How to identify my wbs chargecode in powershell


        A WBS (Work Breakdown Structure) / Charge code is usually not something Powershell can 'discover' automatically from your system because it's company-specific financial/project data (Stored in tools like SAP, ServiceNow, internal portals, or time-tracking systems).


        1. Check Environment Variables (if your organization uses them)

        Some companies push project/charge codes as environment variables.


        Get-ChildItem Env:
        
        
        


        Look for anything like:

        • WBS
        • CHARGECODE
        • PROJECT
        • COSTCENTER



        2. Check Active Directory (if stored in AD)


        Sometimes WBS/cost center is stored as a user attribute.



        Get-ADUser -Identity $env:USERNAME -Properties *
        
        
        


        Look for fields like:

        • department
        • extensionAttributeX
        • employeeID
        • costCenter



        Filter only relevant fields:


        Get-ADUser -Identity $env:USERNAME -Properties  department,extensionAttribute1,extensionAttribute2



        If you got error like as you can see the image below so in screenshot, the error is very clear:

        Get-ADUser : The term 'Get-ADUser' is not recognized



        How to identify my wbs chargecode in powershell windows 11


        ✅ What this means


        Your PowerShell does not have the Active Directory module installed or loaded.

        Get-ADUser comes from the ActiveDirectory module, which is:

        • ✅ Available on domain-joined machines with RSAT installed
        • ❌ Not available by default on normal Windows installs



        ✅ Fix it (step-by-step)


        🔹 Option 1: Check if module exists but not loaded

        Get-Module -ListAvailable ActiveDirectory


        How to identify my wbs chargecode in powershell windows 11


        👉 If you see output well and good but if you are not seeing then leave it as of now.

        Then just import it:

        Import-Module ActiveDirectory


        Option 2: Install RSAT (Most likely needed)


        Since you’re a IT Support Engineer, this is probably your case.

        Run:


        Get-WindowsCapability -Name RSAT.ActiveDirectory* -Online
        
        
        


        How to identify my wbs chargecode in powershell windows 11


        Install it:


        Add-WindowsCapability -Online -Name RSAT.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0
        
        
        


        How to identify my wbs chargecode in powershell windows 11



        Option 3: If installation is blocked


        In many corporate environments:

        ❌ You may NOT have permission to install RSAT

        👉 Then:

        Ask IT:

        "Please enable RSAT Active Directory PowerShell module on my machine"


        ✅ After fixing


        Use this correct command 

        👉 Environment variables cannot start with numbers

        ✅ Correct version:

        If your username is your ID:


        Get-ADUser -Identity $env:USERNAME -Properties *
        

        Or explicitly:


        Get-ADUser -Identity 221843 -Properties *
        
        
        



        How to identify my wbs chargecode in powershell windows 11



        How to identify my wbs chargecode in powershell windows 11


        Filter WBS / Charge info (after it works)


        Get-ADUser -Identity $env:USERNAME -Properties * |
        Select-Object Name, Department, Title, extensionAttribute1, extensionAttribute2
        



        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.