mserranom / bbrun

Run Bitbucket Pipelines locally
MIT License
208 stars 31 forks source link

"--network" option to specify a Docker network to connect the containers to #57

Open Serializator opened 4 years ago

Serializator commented 4 years ago

Often a Bitbucket pipeline has some sort of deployment step that'll execute some SSH commands on a remote server, rsync some files etc.

At the moment debugging this scenario is quite difficult if you have a local Docker container acting as the "remote server", but the containers running each step don't have access to this "remote server" because they run on different Docker networks.

One way of tackling this is by giving the ability to specify the Docker network to run the containers in, an example would be:

bbrun --network example-network --env "SSH_HOST=example, SSH_USER=bitbucket

Notice the --network example-network, this would allow each step to have access to your container running outside of bbrun using the container name of the "remote server" (assuming that your container is "example" and connected to the "example-network").