You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -35,17 +35,18 @@ You can also use wildcards at the beginning and the end of host name, like `*.ba
35
35
36
36
### Multiple Networks
37
37
38
-
With the new overlay network, your proxy can be deal with many containers in many networks. Default, if you don't use ```--net``` flag, your proxywill be attached at ```bridge``` default network. You can define your container with ```--net=your_network``` option.
38
+
With the addition of [overlay networking](https://docs.docker.com/engine/userguide/networking/get-started-overlay/) in Docker 1.9, your `nginx-proxy` container may need to connect to backend containers on multiple networks. By default, if you don't pass the `--net` flag when your `nginx-proxy` container is created, it will only be attached to the default `bridge`network. This means that it will not be able to connect to containers on networks other than `bridge`.
39
39
40
-
If your proxy try to access at a container in an unattached network, the request is successful.
40
+
If you want your `nginx-proxy` container to be attached to a different network, you must pass the `--net=my-network` option in your `docker create` or `docker run` command. At the time of this writing, only a single network can be specified at container creation time. To attach to other networks, you can use the `docker network connect` command after your container is created:
41
41
42
-
#### Connect Another Network
43
-
44
-
In current Docker release (1.9), you can create a container with only one network. To attach others networks, you can use this command.
45
-
```
46
-
docker network connect my_network my_container
42
+
```console
43
+
$ docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock:ro \
In this example, the `my-nginx-proxy` container will be connected to `my-network` and `my-other-network` and will be able to proxy to other containers attached to those networks.
49
+
49
50
### SSL Backends
50
51
51
52
If you would like to connect to your backend using HTTPS instead of HTTP, set `VIRTUAL_PROTO=https` on the backend container.
@@ -75,7 +76,6 @@ Then start the docker-gen container with the shared volume and template:
0 commit comments