I need to setup a developer box using Docker and this mean I will have:
This is a setup where multiple containers will be running in a "central server" and the developers will connect to this "central server" thru SSH or Samba or any other way (not defined yet).
Take this as an small example:
/home/dev1/sources
/home/dev2/sources
cont_dev1 (volumes) => /home/dev1/sources:/var/www/html | port: 8080 | URL: http://dev1.box.com
cont_dev2 (volumes) => /home/dev2/sources:/var/www/html | port: 8081 | URL: http://dev2.box.com
box.com
is a domain assigned to the external IP address to the "central server".
The idea behind this is not to install the development tools on the server itself so we can use the advantages of Docker (switching between tools easily for just mention one).
I have never did that before so my currently questions/problems are:
I am pretty sure my guess is right on the second point but for the first one I don't have a clue in how to achieve it. Any example will help me a lot and I'll be very grateful.
You could create a docker-machine for each of the developers on the developer box with
$ docker-machine create
(Docs: https://docs.docker.com/machine/reference/create/)
How to create a docker machine you can read here: https://docs.docker.com/machine/get-started/
After you did that, each developer could connect to his docker-machine via ssh, by using the
$ docker-machine ssh <machineName>
command. (Docker Docs: https://docs.docker.com/machine/reference/ssh/ )
Also it should be possible, to use the machine on the developer box like his local one by using the
$ docker-machine env
Command. (Docker Docs: here: https://docs.docker.com/machine/reference/env/)
Hope that helps or gives you an idea what you could do.
Best Regards, Kalle
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With