· Project  · 1 min read

Docker port-forward

kubectl port-forward command is quite useful. I just made the same for docker 🫡

kubectl port-forward command is quite useful. I just made the same for docker 🫡

Ever felt jealous of Kubernetes kubectl port-forward command while you’re wrestling with Docker ?

I just crafted a tiny shell script that lets you forward local ports to your Docker containers faster than you can say “Why isn’t this already a Docker feature?”

Let’s be honest, it was just a pretext to craft a one-liner install script in Bash 😏

You can give it a try :

Terminal window
# install
curl -o- https://raw.githubusercontent.com/vspiewak/dpf/master/install.sh | bash
# then
dpf <container-name> <local-port> <container-port>
# or simpler
dpf <container-name> <port>

You can review this project on Github

Back to Blog

Related Posts

View All Posts »