1. 程式人生 > >使用jenkins+marathon+docker完成自動化部署

使用jenkins+marathon+docker完成自動化部署

1.前置條件

Docker開啟TCP埠

開啟docker apiserver的2375管理埠,本示例在CentOS7環境下。編輯docker.service檔案,修改ExecStart引數,新增-H tcp://0.0.0.0:2375 -H unix://var/run/docker.sock

vim ./usr/lib/systemd/system/docker.service
[Service]
Type=notify
# the default is not to use systemd for cgroups because the delegate issues still
# exists and systemd currently does not support the cgroup feature set required
# for containers run by docker ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix://var/run/docker.sock ExecReload=/bin/kill -s HUP $MAINPID TimeoutSec=0 RestartSec=2 Restart=always