gentoo-portage/Dockerfile.template: Use 'webrsync --revert'
[dockerfile.git] / stunnel / README.md
1 Use this [stunnel][] image to wrap other containers in SSL/TLS
2 encryption using Docker's [linking][].  You'll want to
3 [volume-mount][volume-mount] your SSL keys, since you may want
4 different keys in every stunnel container.
5
6     $ docker run -d --name postgresql-0 wking/postgresql
7     $ docker run -d --name postgresql-0-ssl -v /etc/postgresql-0-ssl/stunnel.pem:/etc/stunnel/stunnel.pem --link postgresql-0:server -p 5432:9999 wking/stunnel
8
9 [PostgreSQL][] [uses plaintext commands to initiate SSL/TLS
10 encryption][SSLRequest] so you can't use `psql` to connect directly to
11 this client.  You can use it for protocols that use SSL/TLS from the
12 start (e.g. HTTPS).  If you need support for an initially unencrypted
13 protocol, your best bet is to avoid stunnel and use the SSL/TLS
14 support in the server itself.  Failing that, you can always setup a
15 client-side stunnel, and have both the server and client think they're
16 talking in the clear.
17
18 [stunnel]: https://www.stunnel.org/
19 [linking]: http://docs.docker.io/en/latest/use/port_redirection/#linking-a-container
20 [volume-mount]: http://docs.docker.io/en/latest/use/working_with_volumes/#mount-a-host-directory-as-a-container-volume
21 [PostgreSQL]: http://postgresql.io/
22 [SSLRequest]: http://www.postgresql.org/docs/devel/static/protocol-flow.html#AEN100370