0
点赞
收藏
分享

微信扫一扫

容器空跑神技

时光已翩然轻擦 2022-02-16 阅读 98

针对市面上各种奇奇怪怪的容器。
空跑命令

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": {}
    }
  ]
}

你学会了吗?

举报

相关推荐

0 条评论