All Projects → johanhaleby → Docker Machine Port Forwarder

johanhaleby / Docker Machine Port Forwarder

Licence: apache-2.0
Simple bash script that makes it easier to forward ports from Docker Machine

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Docker Machine Port Forwarder

data-processing-pipeline
Real-Time Data Processing Pipeline & Visualization with Docker, Spark, Kafka and Cassandra
Stars: ✭ 79 (-26.17%)
Mutual labels:  docker-machine
Docker Machine Parallels
Parallels driver for Docker Machine https://github.com/docker/machine
Stars: ✭ 391 (+265.42%)
Mutual labels:  docker-machine
Image Builder Rpi
SD card image for Raspberry Pi with Docker: HypriotOS
Stars: ✭ 973 (+809.35%)
Mutual labels:  docker-machine
docker-windows-azure
Deploy a Windows "Docker-Machine" on Azure
Stars: ✭ 19 (-82.24%)
Mutual labels:  docker-machine
Docker Machine Vmwareworkstation
VMWare Workstation driver for Docker Machine https://github.com/docker/machine
Stars: ✭ 355 (+231.78%)
Mutual labels:  docker-machine
Windows Docker Machine
Work with Windows containers and LCOW on Mac/Linux/Windows
Stars: ✭ 667 (+523.36%)
Mutual labels:  docker-machine
node-docker-machine
Programmatic API to Docker Machine.
Stars: ✭ 21 (-80.37%)
Mutual labels:  docker-machine
Docker For All
Docker applied in development, devops, testing, product management etc.
Stars: ✭ 88 (-17.76%)
Mutual labels:  docker-machine
Awesome Docker
🐳 A curated list of Docker resources and projects
Stars: ✭ 20,870 (+19404.67%)
Mutual labels:  docker-machine
Docker Machine Zsh Completion
A more functional and up-to-date zsh completion for docker-machine
Stars: ✭ 14 (-86.92%)
Mutual labels:  docker-machine
mobymac
Automagically install Docker in a VirtualBox VM with super-fast NFS mounts.
Stars: ✭ 79 (-26.17%)
Mutual labels:  docker-machine
Docker Machine Driver Hetzner
Docker machine driver for the new hetzner cloud API
Stars: ✭ 308 (+187.85%)
Mutual labels:  docker-machine
Adop Docker Compose
Talk to us on Gitter: https://gitter.im/Accenture/ADOP
Stars: ✭ 763 (+613.08%)
Mutual labels:  docker-machine
docker-machine-driver-bhyve
Docker Machine driver for Bhyve
Stars: ✭ 27 (-74.77%)
Mutual labels:  docker-machine
Hetzner Gitlab Runner
Autoscale gitlab ci runners on hetzner cloud
Stars: ✭ 36 (-66.36%)
Mutual labels:  docker-machine
hotsub
Command line tool to run batch jobs concurrently with ETL framework on AWS or other cloud computing resources
Stars: ✭ 29 (-72.9%)
Mutual labels:  docker-machine
Docker Windows Box
Various Vagrant envs with Windows 2019/10 and Docker, Swarm mode, LCOW, WSL2, ...
Stars: ✭ 487 (+355.14%)
Mutual labels:  docker-machine
Docker Workshop
Docker Workshop
Stars: ✭ 104 (-2.8%)
Mutual labels:  docker-machine
Docker Swarm
🐳🐳🐳 This repository is part of a blog series on Docker Swarm example using VirtualBox, OVH Openstack, Azure and Amazon Web Services AWS
Stars: ✭ 43 (-59.81%)
Mutual labels:  docker-machine
Docker Machine Driver Xhyve
docker-machine/minikube/minishift driver plugin for xhyve/hyperkit (native macOS hypervisor.framework)
Stars: ✭ 879 (+721.5%)
Mutual labels:  docker-machine

Docker Machine Port Forwarding

A small bash script that makes it easier to expose ports between docker-machine (VirtualBox or macOS hypervisor like xhyve, HyperKit etc.) and the host when using Docker Machine on macOS. The script is called pf which stands for "port forward". You can also read more on this blog.

Usage

$ pf 8080

Forwards port 8080 in the container to port 8080 on the host in docker-machine environment default by opening an SSH connection to VirtualBox in the background.

If you run into this error:

Host does not exist: "default"

you'll need to specify the name of your docker-machine environment. For example:

$ pf 8080 -e dev

This will use the dev docker-machine environment.

Stopping the port forwarding

If you've started port forwarding in the background (default) you can easily stop it using:

$ pf 8080 -s

Note that you don't need to specify an environment (-e) for this to work.

Port Mapping

You can map the docker port to another port on the host like this:

$ pf 8090:8080

This will map port 8090 on the host to port 8080 running in the container.

Foreground

You can also start the port forwarding process in the foreground:

$ pf 8080 -f

If you do this you'll see the docker-machine and once it's shutdown the port forwarding is also stopped automatically (i.e. no need to run pf 8080 -s).

Help

Run pf -h to for more options

Advanced

If you need more advanced options just use the vanilla docker-machine command. The purpose of pf is to make it really easy to do the most basic things.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].