From inside of a Docker container, how do I connect to the localhost of the machine

Raunak Jain
Updated on 17-Mar-2026 09:01:38

14K+ Views

When running applications in Docker containers, you often need to connect from the container to services running on the host machine's localhost. For example, if you have an Nginx container that needs to access a MySQL database running on your host's localhost (127.0.0.1), the default container networking won't allow this connection since the container has its own isolated network namespace. This article explains different methods to establish connectivity between Docker containers and host services, with solutions varying by operating system and networking requirements. Method 1 − Host Network Mode (Linux) The simplest solution on Linux is using ... Read More

What is multithreaded programming?

Bhanu Priya
Updated on 17-Mar-2026 09:01:38

2K+ Views

A thread is a lightweight unit of CPU execution within a process. It comprises a thread ID, a program counter, a register set, and a stack. Multiple threads belonging to the same process share the code segment, data section, and operating system resources like open files and signals. A traditional heavyweight process has a single thread of control. However, if a process has multiple threads of control, it can perform more than one task concurrently. Many modern software applications are multithreaded, implementing the application as a single process with several threads of control. For example − A word ... Read More

Lightweight process (LWP)

Arnab Chakraborty
Updated on 17-Mar-2026 09:01:38

4K+ Views

Many systems implement either the many-to-many or the two-level model by placing an intermediate data structure between user and kernel threads. This data structure is typically known as a Lightweight Process (LWP) and serves as a virtual processor for scheduling user threads. How Lightweight Processes Work To the user-thread library, the LWP appears to be a virtual processor on which the application can schedule a user thread to run. Each LWP is attached to a kernel thread, and it is the kernel threads that the operating system schedules to run on physical processors. ... Read More

Compare two directories in Linux?

Satish Kumar
Updated on 17-Mar-2026 09:01:38

2K+ Views

Comparing directories in Linux is a common task when managing files, troubleshooting issues, or synchronizing data between locations. There are multiple approaches available, from command-line utilities to graphical tools, each offering different levels of detail and functionality. This guide explores various methods to compare two directories in Linux, ranging from basic command-line tools to advanced GUI applications with visual interfaces. Sample Directory Structure For demonstration purposes, let's create two sample directories with similar but not identical contents: Dir1 ... Read More

Publishing a Docker Image on Dockerhub

Raunak Jain
Updated on 17-Mar-2026 09:01:38

403 Views

Docker Hub is Docker's official cloud-based registry that hosts millions of pre-built Docker images and allows users to publish their own custom images. To interact with Docker Hub for pulling or pushing images, you need to create an account and understand the publishing workflow. Creating a Docker Hub Account and Repository Before publishing images, you must set up your Docker Hub presence − Visit Docker Hub and create an account or sign in with existing credentials. After signing in, click "Create Repository" on the welcome page. Fill in repository details including name, description, and visibility (public ... Read More

How to Install Airsonic Media Server on CentOS 7

Satish Kumar
Updated on 17-Mar-2026 09:01:38

364 Views

Airsonic is an open-source web-based media server that allows users to manage, stream, and share their audio and video files. It is a versatile and powerful tool, with support for various media formats, as well as integration with third-party services like Last.fm and Tidal. This guide walks you through the complete process of installing Airsonic on a CentOS 7 system. Prerequisites Before starting, ensure that you have − A CentOS 7 system with root or sudo access. A stable internet connection. Basic knowledge of command line. Step 1: ... Read More

How to Install an RPM File On Linux OS (CentOS, RHEL, & Fedora)?

Satish Kumar
Updated on 17-Mar-2026 09:01:38

6K+ Views

If you are a Linux user, you are likely to encounter RPM files at some point. An RPM file, or Red Hat Package Manager, is a package management system for installing, updating, and removing software on Linux operating systems such as CentOS, RHEL, and Fedora. RPM files are similar to .deb files in Debian-based operating systems. In this article, we will guide you through the steps required to install an RPM file on Linux operating systems such as CentOS, RHEL, and Fedora. Step 1: Download RPM File Before you can install an RPM file, you must first ... Read More

How do I get into a Docker container's shell?

Raunak Jain
Updated on 17-Mar-2026 09:01:38

16K+ Views

Docker containers provide isolated environments for applications, and accessing their shell is essential for debugging, testing, and interactive work. Once you have a Docker container, you can work with its environment just like an Ubuntu machine − execute commands, explore the file system, and deploy applications. There are three primary methods to access a Docker container's shell, depending on the container's current state and your specific needs. Method 1: Docker Run Command Use this method when you want to create and run a new container with immediate shell access. The docker run command creates a container from ... Read More

What are Scheduling Queues?

Bhanu Priya
Updated on 17-Mar-2026 09:01:38

18K+ Views

Scheduling queues are data structures used by the operating system to organize processes in different states. The OS maintains several types of queues to efficiently manage process scheduling and resource allocation. Types of Scheduling Queues The operating system uses three main types of scheduling queues − Job Queue − Contains all processes entering the system Ready Queue − Stores processes in the ready state waiting for CPU allocation Device Queues − Hold processes waiting for specific I/O devices Process Flow Through Queues Process Movement Through Scheduling Queues ... Read More

Data structures of a Windows thread

Arnab Chakraborty
Updated on 17-Mar-2026 09:01:38

837 Views

Windows implements the Windows API, which is the primary API for the family of Microsoft operating systems (Windows 98, NT, 2000, XP, and Windows 7). A Windows application runs as a separate process, and each process may contain one or more threads. Additionally, Windows uses the one-to-one mapping, where each user-level thread maps to an associated kernel thread. Components of a Windows Thread The general components of a thread include − A thread ID uniquely identifying the thread A set of registers representing the status of the processor A user stack, employed when the thread is ... Read More

Advertisements