mirror of
https://github.com/cytopia/devilbox.git
synced 2025-02-20 17:33:05 +00:00
Add documentation to connect to external hosts, services or container
This commit is contained in:
parent
b8a571065d
commit
5d6a8914d6
@ -4,4 +4,14 @@
|
||||
Connect to external hosts
|
||||
*************************
|
||||
|
||||
TODO
|
||||
|
||||
Connecting from inside a Devilbox Docker container to any external host works out of the box.
|
||||
The only thing you need is internet/network access and know its hostname or IP address.
|
||||
|
||||
Each container has internet access, thus you can ``curl``, ``fetch``, connect to or download
|
||||
any online resources from within the container.
|
||||
|
||||
|
||||
.. seealso::
|
||||
* :ref:`connect_to_host_os`
|
||||
* :ref:`connect_to_other_docker_container`
|
||||
|
@ -83,6 +83,8 @@ CNAME: ``docker.for.win.host.localhost``
|
||||
Docker Toolbox
|
||||
==============
|
||||
|
||||
.. note:: This section applies for both, Docker Toolbox on MacOS and Docker Toolbox on Windows.
|
||||
|
||||
Docker Toolbox behaves the same way as Docker on Linux, with one major difference.
|
||||
The Devilbox IP address or the custom provided CNAMEs actually refer to the Docker Toolbox machine.
|
||||
|
||||
|
@ -4,4 +4,41 @@
|
||||
Connect to other Docker container
|
||||
*********************************
|
||||
|
||||
TODO
|
||||
Other Docker container can either be accessed by connecting back to the host os or by adding its
|
||||
image directly to the Devilbox stack.
|
||||
|
||||
|
||||
**Table of Contents**
|
||||
|
||||
.. contents:: :local:
|
||||
|
||||
|
||||
Any Docker container on host os
|
||||
===============================
|
||||
|
||||
1. To connect to any other Docker container on your host os from within the Devilbox Docker
|
||||
container, you first need to make sure, you are able to connect to your host os from within the
|
||||
Devilbox Docker container.
|
||||
|
||||
.. seealso:: :ref:`connect_to_host_os`
|
||||
|
||||
2. Once you are able to connect to the host os, start any other Docker container and make its
|
||||
port that you want to access available to your host os by specifying ``-p``.
|
||||
An example with e.g. an external `Grafana <https://hub.docker.com/r/grafana/grafana/>`_ container
|
||||
might look like this:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
host> docker run -d --name=grafana -p 3000:3000 grafana/grafana
|
||||
|
||||
You can then connect to your host os on port ``3000`` from within the Devilbox Docker container
|
||||
and be able to use it.
|
||||
|
||||
|
||||
Add Docker container to Devilbox stack
|
||||
======================================
|
||||
|
||||
Alternatively you can also add any Docker container to the Devilbox network by adding an image
|
||||
it to the Devilbox stack directly.
|
||||
|
||||
.. seealso:: :ref:`add_your_own_docker_image`
|
||||
|
Loading…
x
Reference in New Issue
Block a user