免責聲明

Disclaimer (免責聲明)
繼續閱覽代表您接受以上的免責聲明.
To continue reading means you accept the above disclaimer.

2015年3月24日 星期二

docker -H


$ sudo docker -H tcp://0.0.0.0:2375 -d
$ sudo docker -H tcp://localhost:2375 -d
$ sudo docker -H tcp://ec2_priv_ip:2375 -d


$ docker --help
"""...
-H, --host=[]
The socket(s) to bind to in daemon mode or connect to in client mode,
specified using one or more tcp://host:port, unix:///path/to/socket, fd://* or fd://socketfd.


..."""



//=== https://docs.docker.com/articles/basics/#bind-docker-to-another-hostport-or-a-unix-socket
"""...
-H accepts host and port assignment in the following format:
tcp://[host][:port]` or `unix://path

...
Run Docker in daemon mode:

$ sudo /docker -H 0.0.0.0:5555 -d &
Download an ubuntu image:

$ sudo docker -H :5555 pull ubuntu


... You can use multiple -H, for example, if you want to listen on both TCP and a Unix socket

# Run docker in daemon mode
$ sudo /docker -H tcp://127.0.0.1:2375 -H unix:///var/run/docker.sock -d &

..."""


沒有留言:

張貼留言