Getting a docker container's stdout logs into a variable on Linux
Explains how to capture only a Docker container's stdout logs into a Bash variable by redirecting stderr on the host system.
Amit Saha is a Sydney-based software engineer, author, and open-source contributor who shares knowledge through articles, books, and conference talks. He contributes to major projects across Go, Python, Java, Rust, and cloud-native ecosystems.
110 articles from this blog
Explains how to capture only a Docker container's stdout logs into a Bash variable by redirecting stderr on the host system.
Explains how a cached node_modules directory caused ASP.NET compilation to fail by attempting to compile JavaScript files, with a workaround.
A guide to creating a Windows Scheduled Task that automatically prunes unused Docker images to free up disk space on a server.
A guide to achieving zero-downtime deployments for Docker applications using Traefik's API for backend registration checks.
Fixing Docker build network issues by using iptables to manage ephemeral source port ranges for containerized builds.
Explains the implicit lifecycle hook created by AWS CodeDeploy when linking to an Auto Scaling Group via IaC, and its potential issues.
Explains the differences between hard links and symbolic links on Linux, covering inodes, link counts, and practical examples.
A technical guide on manually generating and installing a Let's Encrypt SSL certificate for an IIS server using certbot with GoDaddy DNS validation.
Fedora Scientific now offers Vagrant boxes, providing a pre-configured environment for scientific computing with KDE desktop and open-source tools.
A developer recounts a frustrating two-day debugging journey caused by a Docker configuration issue, highlighting the importance of sane defaults in software tools.
Explains how AWS VPC public/private subnets and EC2 instances with/without public IPs handle Internet ingress and egress traffic via NAT and routing.
How to use the Flyway baseline command to introduce database migrations into an existing, pre-populated database schema.
A guide to using `git add -p` to selectively stage specific changes within a file for a commit, improving commit history.
A guide on using Packer to build custom Fedora Scientific Vagrant boxes for VirtualBox, including troubleshooting SSH issues.
Resolving Flyway migration errors in SQL Server due to non-empty schemas and leftover global assemblies.
A guide to accessing and manipulating data within Go's html/template package, covering variables, structs, and arrays.
A technical guide on using curl to download files, troubleshooting common errors like redirects and binary output warnings.
Explains how to use Docker's userns-remap feature with Linux system users to solve permission issues in CI/build environments.
Guide to configuring Docker containers to resolve private AWS Route53 DNS names by setting the VPC DNS server for the Docker daemon.
Explains how AWS Network ACLs and ephemeral port ranges can cause intermittent Docker connectivity issues, with a detailed solution.