Main question
Imagine this scenario.
- A network of 192.168.0.0/24.
- A computer with hostname 'Docker-Host' is running a docker engine at 192.168.0.2
- 'Docker-Host' has sshd server running
- On 'Docker-Host' , I'm running a application in a container that uses ssh:22 and https:443 (GitLab)
How do I assignee this container an IP of 192.168.0.3?
I need services to run on their designed default ports.
Additional Information
I cannot use a reverse proxy as a solution because that does not solve the problem of how to communicate with the GitLab instance over SSH.
Mapping the port 22 to a different port on the host is unprofessional in this situation, and my client developers would not like the setup.
This also would be a struggle to maintain if I was spinning up many instances of this application. and had to keep mapping each SSH to a new port on the host for each container.
My clients need to be able to resolve and run the following without additional configuration client side.
https://GitLab.internal.net.work
ssh git clone https://GitLab.internal.net.work
I have reviewed the Docker Network Documention, and unless I'm mistaken, I don't see a easy maintainable solution (although I'm still new to Docker).
How can this be done? What are other people doing in this situation as 'best practice'? (if possible, give answers in form of docker-compose syntax).