Skip to content

Blog

Can We Build a Docker Container Without a Shell? A Technical Guide

Introduction

Docker containers have revolutionized how we package and deploy applications, offering consistency across environments and efficient resource utilization. By default, most container images include a shell (e.g., sh, bash) to facilitate interaction, script execution, and process management. However, in security-sensitive or minimalistic environments, including a shell can introduce unnecessary risks: an attacker who gains access to the container could use the shell to escalate privileges, exfiltrate data, or launch further attacks.

This raises a critical question: Can we build a Docker container without a shell? The answer is a resounding yes—and in this guide, we’ll explore why you might want to, the technical challenges involved, and step-by-step methods to create shell-less containers. We’ll also cover verification, use cases, and limitations to help you decide if shell-less containers are right for your workload.

Can We Unit Test Memory Allocation? Testing Allocated Size in Custom Routines & Alternatives

Introduction

Memory allocation is a foundational operation in software development, powering dynamic data structures, resource management, and runtime flexibility. Whether you’re working in C, C++, or other systems languages, ensuring that memory is allocated correctly—especially in custom allocation routines—is critical to avoiding bugs like buffer overflows, memory leaks, and performance bottlenecks.

But here’s the question: Can we unit test memory allocation? More specifically, can we verify that a function or custom allocator allocates the exact size of memory it’s supposed to? Unit testing typically focuses on deterministic, isolated behavior, but memory allocation involves interactions with the system heap, which is global, non-deterministic, and prone to side effects.

In this blog, we’ll demystify the challenges of unit testing memory allocation, explore techniques to test allocated size (including in custom routines), and discuss alternatives when direct unit testing isn’t feasible. By the end, you’ll have a clear roadmap to validate memory allocation behavior in your codebase.

Can Windows Containers Run on Linux? .NET Framework (net462) Apps, Docker Desktop, and Why Linux Can’t (Plus .NET Standard Workaround)

Introduction

Containerization has revolutionized how we develop, ship, and run applications, with Docker leading the charge as the de facto standard. As organizations adopt multi-cloud and hybrid environments, a common question arises: Can Windows containers run on Linux? This is especially critical for teams maintaining legacy .NET Framework applications (e.g., targeting net462), which have long been tied to Windows.

In this blog, we’ll demystify the technical barriers preventing Windows containers from running natively on Linux, explore the role of Docker Desktop in cross-OS container management, and detail why .NET Framework apps like net462 are inherently Windows-bound. Finally, we’ll outline a practical workaround using .NET Standard to migrate these apps to cross-platform .NET, enabling them to run on Linux containers.

Cannot Find Yasm When Configuring x264? Fix Installed Yasm Detection Issue

Introduction

If you’ve ever tried compiling x264 from source, you may have encountered the frustrating error: “yasm/nasm not found or too old. Use --disable-asm for a slower build.” This error occurs when the x264 configuration script fails to detect an assembler (NASM or Yasm), which is critical for enabling high-performance assembly optimizations in x264. Without an assembler, x264 falls back to slower C-based code, leading to suboptimal encoding speeds.

x264 is a widely used open-source H.264/AVC video encoder, prized for its balance of speed and quality. x264 relies on an assembler—historically Yasm, but now NASM (Netwide Assembler) by default—to compile low-level assembly code that enables CPU-specific optimizations (e.g., x86_64, ARM). If no assembler is detected during configuration, x264 can’t unlock these optimizations.

Note (2026): Modern versions of x264 default to NASM as the assembler, not Yasm. Yasm is now largely unmaintained (last release in 2019) and has been deprecated by major distributions such as Fedora. If you are setting up a new build environment, install NASM instead of Yasm. The troubleshooting steps below still apply to both assemblers.

In this blog, we’ll demystify why the assembler goes undetected, even when “installed,” and walk through step-by-step solutions to resolve the issue. Whether you’re on Linux, macOS, or Windows, we’ve got you covered.

How to Change Thread Names in htop on Linux: Bypassing prctl's 16-Byte Limit and Read-Only /proc/cmdline

Introduction

When managing processes and threads on Linux, tools like htop provide invaluable insights into system resource usage. A common frustration, however, is the limited thread/process name length displayed in htop—often truncated to 16 characters. Additionally, many users encounter roadblocks when trying to modify process names via /proc/cmdline, which is read-only.

This blog demystifies the 16-byte limit, explains why it exists, and explores practical workarounds to display more descriptive names in htop. We'll cover thread vs. process names, standard tools like prctl and pthread_setname_np, and even hacky (but effective!) methods to bypass limitations for processes.

How to Compile GLib with Non-Standard Libffi Paths: Fixing 'No package libffi found' Configure Error

Introduction

GLib is a fundamental library for developing applications in C, providing core utilities like data structures, type systems, and OS abstraction. It’s a dependency for countless projects, including GTK, GNOME, and many others. While most users rely on precompiled packages (e.g., via apt, yum, or brew), there are scenarios where compiling GLib from source is necessary—for example, to use a specific version, apply custom patches, or target a non-standard environment.

A common roadblock during GLib compilation is the error: No package 'libffi' found. This occurs when the build system (Meson, which GLib uses since version 2.58) cannot locate the libffi library via pkg-config, a critical dependency for GLib’s foreign function interface (FFI) support. The error is especially prevalent if libffi is installed in a non-standard directory (e.g., /opt/libffi, ~/local, or a custom prefix), as pkg-config may not search these paths by default.

This blog post will guide you through resolving this error step-by-step, from understanding why it occurs to configuring GLib to recognize libffi in non-standard locations.

Fix 'Couldn't find a file descriptor referring to the console' in Ubuntu Bash on Windows: How the Open Command Works

Introduction

The Windows Subsystem for Linux (WSL) has revolutionized how developers and power users interact with Linux tools on Windows. By enabling an Ubuntu (or other Linux) bash environment directly on Windows, WSL bridges the gap between the two ecosystems. However, like any tool, WSL can throw perplexing errors—one common frustration is the message: "Couldn't find a file descriptor referring to the console".

If you've encountered this error while using commands like open (or even xdg-open) in Ubuntu Bash on Windows, you're not alone. This guide (updated for 2026) will demystify the error, explain why it occurs in WSL, and walk you through modern, step-by-step fixes. We'll also explore how file-opening commands work in WSL—including newer tools like wslview and built-in GUI support via WSLg—so you understand the underlying mechanics.

How to Count Character Occurrences Per Line and Field in Unix Files: Step-by-Step Command Guide

Introduction

In Unix and Linux environments, text files are the backbone of data storage, logs, configuration, and more. Whether you’re a system administrator analyzing log files, a data analyst processing CSV/TSV datasets, or a developer debugging code, there’s often a need to count character occurrences—either per line, per field (column), or across the entire file.

This guide demystifies the process of counting characters in Unix files using built-in command-line tools like awk, grep, wc, and tr. We’ll break down step-by-step methods to count: - Total characters per line - Specific character occurrences per line - Total characters per field (column) - Specific character occurrences per field

By the end, you’ll master these techniques to efficiently parse and analyze text files in Unix.

How to Count Characters, Words, and Lines in PowerShell: A Guide Like Linux wc Command

Introduction

For developers, system administrators, and content creators, text processing is a daily task. Whether you’re validating file sizes, analyzing log files, or ensuring a document meets word count requirements, tools that count lines, words, and characters are indispensable. Linux users rely on the wc (word count) command for this, but if you’re working in a Windows environment or prefer PowerShell, you might wonder: How do I achieve the same results?

PowerShell, Microsoft’s task automation framework, offers robust text-processing capabilities that can replicate (and even extend) the functionality of wc. In this guide, we’ll break down how to count lines, words, and characters in PowerShell, drawing direct comparisons to Linux’s wc command. By the end, you’ll be able to replace wc -l, wc -w, and wc -c with PowerShell equivalents—and even tackle advanced scenarios like recursive counting or handling large files.

How to Easily Count the Number of Times a Word Appears in a File: A Step-by-Step Guide

Introduction

Whether you’re a student analyzing a literary text, a content creator optimizing SEO keywords, a developer debugging logs, or a researcher quantifying themes in documents, counting how often a word appears in a file is a common and useful task. Fortunately, you don’t need expensive software or advanced technical skills to do this. In this guide, we’ll walk you through four simple methods to count word occurrences, ranging from command-line tools to text editors, Python scripts, and online tools. By the end, you’ll be able to choose the method that best fits your needs—no prior expertise required!