$ 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 &
..."""
2015年3月24日 星期二
docker -H
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言