Docker run 命令
docker run -d -p 8084:80 --name weather --restart always --link fme-postgis 192.168.1.220:5000/weather:develop /bin/sh -c 'java -classpath /Service/weatherChina-1.0.0-SNAPSHOT.jar com.weather.weatherChinaJar > /logs/run_log 2>&1'
-d :后台运行容器
-p IP:host_port:container_port 或 -p IP::port
配置网络访问域名(ip)和端口转发容器端口
监听主机的指定域名端口转发到容器的端口
-name 为容器指定一个名称
--link 让容器之间安全的进行交互
--restart Restart policy to apply when a container exits
posted on 2017-11-02 13:51 danny_1990 阅读(106) 评论(0) 编辑 收藏 举报