-->

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 windows 11. Show all posts
Showing posts with label windows 11. Show all posts
  • Folder Backup Automation in Batch Scripting

     

    Folder Backup Automation in Batch Scripting

     

     



    Folder Backup Automation in Batch Scripting | Automatically Backup Any Folder


    Backing up important folders is one of the most common tasks performed by IT Support Engineers and System Administrators. Instead of copying files manually every day, you can automate the process with a simple Batch Script.

    In this tutorial, we'll create a Folder Backup Automation script that copies a selected folder to a backup location automatically.



    Batch Script



    @echo off

    set SourceFolder=C:\Users\%USERNAME%\Documents

    set BackupFolder=D:\Backup

    if not exist "%BackupFolder%" (
        mkdir "%BackupFolder%"
    )

    xcopy "%SourceFolder%" "%BackupFolder%\Documents" /E /I /Y

    echo.
    echo Folder Backup Completed Successfully.

    pause




    How the Script Works


    #Step 1: Turn Off Command Display

    @echo off

    This hides the commands while the script runs, making the output cleaner.


    #Step 2: Set the Source Folder

    • set SourceFolder=C:\Users\%USERNAME%\Documents



    The variable `SourceFolder` stores the folder you want to back up.

    The `%USERNAME%` environment variable automatically inserts the name of the currently logged-in Windows user.



    #Step 3: Set the Backup Location

    • set BackupFolder=D:\Backup


    This defines where the backup will be stored.

    You can change this location to another drive or folder if needed.



    #Step 4: Create the Backup Folder

    if not exist "%BackupFolder%" (
        mkdir "%BackupFolder%"
    )


    If the backup folder doesn't already exist, the script creates it automatically.


    #Step 5: Copy the Files

    xcopy "%SourceFolder%" "%BackupFolder%\Documents" /E /I /Y

    The `xcopy` command copies all files and folders.



    #XCOPY Options



    | Option | Description                                 |
    |  | - |
    | `/E`   | Copies all folders, including empty folders |
    | `/I`   | Creates the destination folder if needed    |
    | `/Y`   | Overwrites existing files without asking    |



    #Step 6: Display Success Message
    echo Folder Backup Completed Successfully.


    This informs the user that the backup process has completed.


    #Step 7: Pause the Script
    pause


    Keeps the Command Prompt window open until a key is pressed.

    Sample Output

    Folder Backup Completed Successfully.

    Press any key to continue . . .




    Why Automate Folder Backups?


    Automating backups helps you:

    • * Protect important files
    • * Save time
    • * Reduce manual work
    • * Minimize the risk of data loss
    • * Keep regular backups without repeating the same steps




    Real-World Uses


    IT Support Engineers and System Administrators commonly use folder backup scripts to:

    * Backup user Documents before Windows reinstallation
    * Copy project files to another drive
    * Protect company data
    * Create backups before software upgrades
    * Automate daily maintenance tasks



    Customize the Script


    You can back up other folders by changing the `SourceFolder` variable.

    Examples:

    Desktop
    C:\Users\%USERNAME%\Desktop


    Downloads
    C:\Users\%USERNAME%\Downloads


    Pictures
    C:\Users\%USERNAME%\Pictures


    You can also change the destination folder to another drive, external USB device, or network location if accessible.



    Commands Used



     

    Folder Backup Automation in Batch Scripting





    Interview Questions


    #What does `xcopy` do?

    • It copies files and folders from one location to another.


    #Why is `if not exist` used?

    • It checks whether the destination folder exists before creating it.


    #What does `%USERNAME%` represent?

    • It stores the name of the currently logged-in Windows user.

    #What is the purpose of `/E` in `xcopy`?

    • It copies all folders, including empty ones.

    #Why should folder backups be automated?

    • Automation saves time, reduces manual effort, and helps protect important data.




    Conclusion


    Folder Backup Automation is a practical Batch Scripting project that demonstrates how to automate one of the most common Windows administration tasks. By combining variables, folder checks, and the `xcopy` command, you can create a reliable backup solution for personal or professional use.

    If you're preparing for an IT Support Engineer, Desktop Support Engineer, or System Engineer role, this project showcases your ability to automate routine maintenance tasks and is a valuable addition to your Batch Scripting portfolio.
     

     

  • IT Support Toolkit in Batch Scripting

     

    IT Support Toolkit in Batch Scripting

     

     

    IT Support Toolkit in Batch Scripting | Build Your Own Windows Troubleshooting Tool


    IT Support Engineers perform many repetitive tasks every day, such as checking system information, troubleshooting network issues, opening Windows tools, and cleaning temporary files. Instead of running each command manually, you can automate these tasks using a single Batch Script.

    In this tutorial, we'll build a simple **IT Support Toolkit** in Batch Scripting that displays a menu and lets you choose common troubleshooting tasks.



    Batch Script

    @echo off
    title IT Support Toolkit
    color 0A
    
    :menu
    cls
    echo =====================================
    echo         IT SUPPORT TOOLKIT
    echo =====================================
    echo.
    echo 1. System Information
    echo 2. Network Information
    echo 3. Ping Test
    echo 4. Flush DNS Cache
    echo 5. Open Device Manager
    echo 6. Open Task Manager
    echo 7. Open Event Viewer
    echo 8. Clean Temp Files
    echo 9. Exit
    echo.
    
    set /p choice=Select an option (1-9): 
    
    if "%choice%"=="1" goto systeminfo
    if "%choice%"=="2" goto network
    if "%choice%"=="3" goto pingtest
    if "%choice%"=="4" goto flushdns
    if "%choice%"=="5" goto devicemanager
    if "%choice%"=="6" goto taskmanager
    if "%choice%"=="7" goto eventviewer
    if "%choice%"=="8" goto cleantemp
    if "%choice%"=="9" exit
    
    echo Invalid choice!
    pause
    goto menu
    
    :systeminfo
    systeminfo
    pause
    goto menu
    
    :network
    ipconfig
    pause
    goto menu
    
    :pingtest
    ping google.com
    pause
    goto menu
    
    :flushdns
    ipconfig /flushdns
    pause
    goto menu
    
    :devicemanager
    start devmgmt.msc
    goto menu
    
    :taskmanager
    start taskmgr
    goto menu
    
    :eventviewer
    start eventvwr.msc
    goto menu
    
    :cleantemp
    del /q /f /s "%temp%\*.*"
    echo Temporary files cleaned successfully.
    pause
    goto menu
    
    






    How the Script Works


    Step 1: Display the Main Menu

    The script starts by displaying a menu with different troubleshooting options.

    • 1. System Information
    • 2. Network Information
    • 3. Ping Test
    • 4. Flush DNS Cache
    • 5. Open Device Manager
    • 6. Open Task Manager
    • 7. Open Event Viewer
    • 8. Clean Temp Files
    • 9. Exit



    The user enters a number to choose the required task.


    Step 2: Read User Input

    • set /p choice=Select an option (1-9):


    The selected option is stored in the variable `choice`.


    Step 3: Execute the Selected Task

    The script uses IF statements to jump to the appropriate section.

    Example:

    if "%choice%"=="1" goto systeminfo
    If the user enters **1**, the script displays detailed system information.


    Features Included


    1. System Information

    • systeminfo


    Displays:

    • * Windows version
    • * Computer name
    • * BIOS information
    • * Installed memory
    • * System boot time



    2. Network Information

    • ipconfig



    Shows:

    • * IP Address
    • * Default Gateway
    • * Subnet Mask
    • * Network Adapter Details



    3. Internet Connectivity Test

    • ping google.com

    Checks whether the computer can reach the internet.


    4. Flush DNS Cache

    • ipconfig /flushdns



    Clears the local DNS cache, which can help resolve certain website or name resolution issues.



    5. Open Device Manager

    • start devmgmt.msc

    Launches Windows Device Manager.


    6. Open Task Manager

    • start taskmgr

    Opens Task Manager to view running processes and system performance.



    7. Open Event Viewer

    • start eventvwr.msc


    Launches Event Viewer to review Windows logs and errors.


    8. Clean Temporary Files

    • del /q /f /s "%temp%\*.*"



    Deletes temporary files from the current user's Temp folder.


    Why Build an IT Support Toolkit?

    Creating a toolkit provides several benefits:

    • * Saves time during troubleshooting
    • * Combines multiple utilities into one script
    • * Reduces repetitive work
    • * Improves productivity
    • * Makes common administrative tasks easily accessible




    Real-World Uses


    IT Support Engineers and System Administrators use similar toolkits to:

    • * Diagnose user issues
    • * Collect system information
    • * Check network connectivity
    • * Troubleshoot Windows problems
    • * Perform routine maintenance
    • * Speed up daily support tasks




    Interview Questions


    What is an IT Support Toolkit?

    • It is a collection of scripts or tools that automate common troubleshooting and administrative tasks.


    Which command displays system information?

    • systeminfo


    Which command checks internet connectivity?

    • ping


    What does `ipconfig /flushdns` do?

    • It clears the DNS resolver cache stored on the local computer.


    Why should IT professionals automate repetitive tasks?

    • Automation improves efficiency, reduces manual effort, and minimizes the chance of human error.



    Conclusion


    An IT Support Toolkit is one of the most practical Batch Scripting projects for beginners. It combines multiple Windows commands into a single, menu-driven application that simplifies troubleshooting and routine maintenance.

    If you're preparing for roles such as **IT Support Engineer**, **Desktop Support Engineer**, **Help Desk Engineer**, or **System Engineer**, this project demonstrates your understanding of Windows administration and automation. It's also an excellent addition to your GitHub repository and technical portfolio.


  • Auto Temp File Cleaner in Batch Scripting

     

    Auto Temp File Cleaner in Batch Scripting



    Auto Temp File Cleaner in Batch Scripting | Delete Temporary Files Automatically


    Over time, Windows stores temporary files that can consume disk space and sometimes affect system performance. While these files are generally safe to remove, deleting them manually can be time-consuming.

    With Batch Scripting, you can automate this task using just a few commands. In this tutorial, we'll create a simple Auto Temp File Cleaner that deletes files from the current user's temporary folder.



    Batch Script

      
    @echo off
    
    echo Cleaning Temp folder...
    
    del /q /f /s "%temp%\*.*"
    
    echo.
    
    echo Temp folder cleaned successfully.
    
    pause
      



    How the Script Works


    Step 1: Turn Off Command Display

    @echo off

    This hides the commands while the script is running, making the output cleaner.



    Step 2: Display a Message

    echo Cleaning Temp folder...

    This lets the user know that the cleanup process has started.



    Step 3: Delete Temporary Files

    del /q /f /s "%temp%\*.*"

    Let's understand each option:







    Step 4: Display Completion Message

    echo Temp folder cleaned successfully.

    This confirms that the script has finished.


    Step 5: Pause the Window

    pause

    Keeps the Command Prompt window open until a key is pressed.



    Sample Output


    Cleaning Temp folder...

    Temp folder cleaned successfully.

    Press any key to continue . . .



    Why Use an Auto Temp File Cleaner?


    Cleaning temporary files can help you:

    • Free up disk space
    • Remove unnecessary temporary files
    • Keep your system organized
    • Save time by automating repetitive tasks
    • Real-World Uses


    System Engineers and IT Support Engineers often use similar scripts to:

    • Clean temporary files during troubleshooting
    • Prepare computers before software installation
    • Perform regular maintenance
    • Include cleanup as part of larger automation scripts
    • Things to Remember
    • Some temporary files may still be in use by Windows or running applications and cannot be deleted immediately.
    • Running the script as an administrator may allow additional files to be removed.
    • This script targets the current user's Temp folder only.



    Interview Questions


    What does %temp% represent?
    • It is an environment variable that points to the current user's temporary folder.

    What does the del command do?
    • It deletes files from a specified location.

    What is the purpose of the /q option?
    • It deletes files without asking for confirmation.
    Why is /f used?

    It forces the deletion of read-only files.

    Why is Batch Scripting useful for system maintenance?
    • It automates repetitive administrative tasks, saving time and reducing manual effort.


    Conclusion


    An Auto Temp File Cleaner is one of the simplest and most practical Batch Scripting projects for beginners. It demonstrates how a few commands can automate a common Windows maintenance task. As you continue learning Batch Scripting, projects like this will help you build automation skills that are valuable for IT Support, System Administration, and future System Engineer roles.




  • How to Fix Copy-Paste Not Working in Remote Desktop (RDP)

     

     

    How to Fix Copy-Paste Not Working in Remote Desktop (RDP)


    How to Fix Copy-Paste Not Working in Remote Desktop (RDP)

      
    One user reported that while using Remote Desktop (RDP), they were unable to copy files or text from their local desktop to the remote desktop.

    After investigating the issue, I identified that the most likely cause was clipboard redirection being disabled or the RDP clipboard process not responding.


    Method 1: Restart the RDP Clipboard Process


    The first troubleshooting step was to restart the rdpclip.exe process.

    Steps:


    Open Task Manager.
    Locate rdpclip.exe (or RDP Clipboard Monitor).
    Right-click the process and select End Task.
    Press Win + R.
    Type:
    rdpclip.exe
    Press Enter to restart the clipboard process.


     

    Method 2: Verify Clipboard Redirection Is Enabled


    Next, I verified that clipboard sharing was enabled in the Remote Desktop settings.

    Steps:


    • Open Remote Desktop Connection.
    • Click Show Options.
    • Go to the Local Resources tab.
    • Under Local devices and resources, ensure that Clipboard is checked.
    • Reconnect to the remote session.

     


    Solution Provided


    The copy-paste issue in the Remote Desktop session was resolved by:

    Restarting the rdpclip.exe process.


    Verifying that Clipboard Redirection was enabled in the Remote Desktop Connection settings.
    After applying these steps, the user confirmed that copy and paste functionality was working normally again.



    Conclusion


    If copy-paste suddenly stops working in a Remote Desktop session, the issue is often caused by a stuck rdpclip.exe process or disabled clipboard redirection. Restarting the clipboard process and verifying the Remote Desktop settings usually resolves the problem within a few minutes.


    Related Articles




     

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



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