简体   繁体   中英

docker mesosphere marathon - unable to see running process inside a docker container

I am a newbie in mesos and marathon space. I have mesos slaves running my docker containers. I am using marathon to instantiate a mesos task. Here is my simple json file:

{
  "container": {
    "type": "DOCKER",
    "docker": {
      "image": "tomcat:8.0"
    }
  },
  "id": "tomcat",
  "instances": 1,
  "cpus": 0.5,
  "mem": 512,
  "uris": [],
  "cmd": "while sleep 10; do date -u +%T; done"
}

I use curl and raise a post request using marathon. My docker container is deployed successfully as per marathon. Till here everything is fine. Now I ssh into my docker container using the command

sudo docker exec -i -t /bin/bash

I do not see any log generated for tomcat. I feel my tomcat has not started. Running telnet 8080 fails as telnet is not available on the container. when I run ps -aef I see th following is available "/bin/sh -c while sleep 10; do date -u +%T; done". However I cannot still say whether tomcat is running. Has anyone faced such issue...any pointers to debug it.

Thanks Ashish

在您的JSON文件中,您应该具有"cmd": "" (最后一行),否则docker容器命令将被覆盖。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM