[
https://issues.apache.org/jira/browse/MESOS-4446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15113910#comment-15113910
]
Abhishek Dasgupta commented on MESOS-4446:
------------------------------------------
This is my json file:
{
"id": "mysqlappcontainer2",
"cpus": 0.5,
"mem": 64.0,
"instances": 1,
"container": {
"type": "DOCKER",
"docker": {
"image": "mysqlapp",
"network": "BRIDGE",
"portMappings": [
{ "containerPort": 3306, "hostPort": 0, "servicePort": 3306,
"protocol": "tcp" }
],
"parameters": [
{ "key": "label", "value": "a.corp.org=production" }
]
}
},
"env": {
"MYSQL_USER" : "root",
"MYSQL_PASS" : "password",
"STARTUP_SQL" : "/dump.sql"
}
}
This is a portion of the docker inspect of the container:
"User": "",
"AttachStdin": false,
"AttachStdout": true,
"AttachStderr": true,
"ExposedPorts": {
"3306/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"MARATHON_APP_VERSION=2016-01-23T19:18:05.956Z",
"HOST=registry48",
"PORT_3306=31093",
"MARATHON_APP_DOCKER_IMAGE=mysqlapp",
"STARTUP_SQL=/dump.sql",
"MESOS_TASK_ID=mysqlappcontainer2.07c45e3f-c206-11e5-bcc9-0242c08cb7e4",
"PORT=31093",
"MYSQL_USER=root",
"PORTS=31093",
"MYSQL_PASS=password",
"MARATHON_APP_ID=/mysqlappcontainer2",
"PORT0=31093",
"MESOS_SANDBOX=/mnt/mesos/sandbox",
"MESOS_CONTAINER_NAME=mesos-8a993bb1-0af7-4ca5-8fc9-645f72e58c9a-S0.100db0a7-28d4-48d6-abd5-dcff831b5b38",
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"ON_CREATE_DB=**False**",
"REPLICATION_MASTER=**False**",
"REPLICATION_SLAVE=**False**",
"REPLICATION_USER=replica",
"REPLICATION_PASS=replica"
],
"Cmd": [
"/run.sh"
],
"Image": "mysqlapp",
"Volumes": {
"/etc/mysql": {},
"/var/lib/mysql": {}
},
"WorkingDir": "",
"Entrypoint": null,
"OnBuild": null,
"Labels": {
"a.corp.org": "production"
},
"StopSignal": "SIGTERM"
},
"NetworkSettings": {
........
> Please add an ability to set Docker labels based on TaskStatus labels
> ---------------------------------------------------------------------
>
> Key: MESOS-4446
> URL: https://issues.apache.org/jira/browse/MESOS-4446
> Project: Mesos
> Issue Type: Story
> Components: docker
> Reporter: Gennady Feldman
>
> So looks like MESOS-3076 added support for Labels to TaskStatus. Would it be
> possible to pass those onto the docker container?
> This would really help with doing "docker inspect" on the mesos-slave nodes
> as well as allow us to better collect docker metrics about the
> tasks/containers that are currently running on the slave.
> docker supports labels out of the box. See here:
> https://docs.docker.com/engine/userguide/labels-custom-metadata/
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)