Have you ever spun up a Docker container, forgot to publish a port — and realized you can’t access your service without restarting the container? 😩
Good news — you don’t have to restart anything. Enter socat! 🚀
In this video, I’ll show you how to use Socat to forward ports from a running Docker container to your host without restarting the container or rebuilding the image.
⸻
📚 What You’ll Learn:
• Why you can’t publish a port after a Docker container starts
• How to use Socat to forward ports dynamically
• Real-time demo: forwarding a Postgres container port to your host
• Bonus: Check your forwarded connection using psql, nc, and pg_isready
⸻
🔧 Tools Used:
• Docker 🐳
• Socat 🔄
• PostgreSQL 📦
• Linux Networking Commands (telnet, nc)
⸻
💻 GitHub Repo for Commands & Examples: https://github.com/JitenPalaparthi/le...
📣 Like, Comment, and Subscribe for More DevOps & Docker Tips!
If this video helped you, smash that 👍 button and subscribe for more container tricks, cloud dev tips, and infrastructure hacks.
⸻
📌 Tags:
#Docker #DockerNetworking #PortForwarding #DockerTips #Socat #DockerPortIssue #PostgreSQL #ContainerNetworking #DevOps #LinuxNetworking #SocatDocker #DockerProxy #DockerContainers #DockerDevOps #DockerPortFix