How do i give a docker container its own routable IP on the originial network?How can I use environment...

Why would a flight no longer considered airworthy be redirected like this?

Co-worker team leader wants to inject his friend's awful software into our development. What should I say to our common boss?

Replacing Windows 7 security updates with anti-virus?

What does it mean to make a bootable LiveUSB?

Good allowance savings plan?

Old race car problem/puzzle

How to make healing in an exploration game interesting

What is the greatest age difference between a married couple in Tanach?

How do I hide Chekhov's Gun?

An Accountant Seeks the Help of a Mathematician

Have researchers managed to "reverse time"? If so, what does that mean for physics?

Happy pi day, everyone!

Counting certain elements in lists

Rules about breaking the rules. How do I do it well?

Rejected in 4th interview round citing insufficient years of experience

Identifying the interval from A♭ to D♯

Dot in front of file

What has been your most complicated TikZ drawing?

Bash: What does "masking return values" mean?

Official degrees of earth’s rotation per day

My story is written in English, but is set in my home country. What language should I use for the dialogue?

Science-fiction short story where space navy wanted hospital ships and settlers had guns mounted everywhere

Is it true that real estate prices mainly go up?

How to simplify this time periods definition interface?



How do i give a docker container its own routable IP on the originial network?


How can I use environment variables in Nginx.confHow to handle security updates within Docker containers?Transparent proxying a single docker container to another docker containerHow to limit access from host to docker containerAccess through jmx to java application into Docker container on remote host in local networkDocker: Map container port to single IPv6-address on hostWebserver in docker container is not reachable via the internetCould not login to docker containerTemporarily expose docker containerDockerized Gitlab-runner can't find Gitlab container













0















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 am 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 im mistaken, i don't see a easy maintainable solution (although im 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)









share



























    0















    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 am 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 im mistaken, i don't see a easy maintainable solution (although im 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)









    share

























      0












      0








      0








      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 am 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 im mistaken, i don't see a easy maintainable solution (although im 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)









      share














      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 am 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 im mistaken, i don't see a easy maintainable solution (although im 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)







      ssh docker kubernetes containers docker-compose





      share












      share










      share



      share










      asked 5 mins ago









      TrevorKSTrevorKS

      285




      285






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "2"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f958367%2fhow-do-i-give-a-docker-container-its-own-routable-ip-on-the-originial-network%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Server Fault!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f958367%2fhow-do-i-give-a-docker-container-its-own-routable-ip-on-the-originial-network%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Фонтен-ла-Гаярд Зміст Демографія | Економіка | Посилання |...

          Список ссавців Італії Природоохоронні статуси | Список |...

          Маріан Котлеба Зміст Життєпис | Політичні погляди |...