Docker tips

1、将Docker daemon的监听端口写入配置文件

配置文件: /etc/default/docker (CentOS: /etc/sysconfig/docker)

写入:DOCKER_OPTS="-H unix:///var/run/docker.sock -H tcp://0.0.0.0:2375"

The -H unix:///var/run/docker.sock configures a local unix socket for Docker to use. This is the default.

The -H tcp://0.0.0.0:2375 option configures Docker to listen on a TCP port

之后重启Docker

sudo restart docker

 

2、

转载于:https://www.cnblogs.com/YaoDD/p/5804286.html

你可能感兴趣的:(Docker tips)