CentOS 7 测试Marathon启动Docker 容器

1.环境规划

3台master,2台slave全都下载docker然后启动

都得pull要启动的镜像到本地

然后在任一slave端

vim 123.json

{

  "id": "basic-3",

  "cmd": "/bin/bash",

  "cpus": 0.5,

  "mem": 32.0,

  "container": {

    "type": "DOCKER",

    "docker": {

      "image": "docker.io/centos:latest",

      "network": "BRIDGE",

      "portMappings": [

        { "containerPort": 8080, "hostPort": 0 }

      ]

    }

  }

}

curl -i -H 'Content-Type: application/json' [email protected] 192.168.0.221:8080/v2/apps

然后打开 marathon web界面,看是否运行成功

更多Docker相关教程见以下内容

Docker 的详细介绍请点这里
Docker 的下载地址请点这里

猜你喜欢

转载自www.linuxidc.com/Linux/2015-11/125032.htm