针对市面上各种奇奇怪怪的容器。 空跑命令
echo 'zhangsan 1.1.1.1' >> /etc/hosts && tail -f /etc/hosts
例如在marathon上空跑容器。
{
"id": "/fm/nginx-cz",
"cmd": "echo 'zhangsan 1.1.1.1' >> /etc/hosts && tail -f /etc/hosts",
"cpus": 1,
"mem": 128,
"disk": 0,
"instances": 1,
"acceptedResourceRoles": [
"fc"
],
"container": {
"type": "DOCKER",
"volumes": [],
"docker": {
"image": "10.172.1.0:80/xad_rod/frontend_nginx:0.0.1",
"network": "HOST",
"portMappings": [],
"privileged": false,
"parameters": [],
"forcePullImage": false
}
},
"portDefinitions": [
{
"port": 10001,
"protocol": "tcp",
"name": "default",
"labels": {}
}
]
}
你学会了吗?
|