Docker上的Registry,Rest API怎么写Marathon才能调用成功?
docker run -d -v /root/my_registry:/tmp/registry -p 5000:5000 registry
Marathon的Rest API怎么写?
curl -X POST -H "Accept: application/json" -H "Content-Type: application/json" x.x.x.x:8080/v2/apps -d '{
"container": {
"type": "DOCKER",
"docker": {
"image": "registry"
}
},
"cpus": 0.5,
"id": "docker-registry",
"instances": 1,
"mem": 30
}'
怎么把-v 和-p 写进去?
3 个回复
bnuhero - 读书喝茶踢球写程序
赞同来自: madayang
文档还是要读的:https://mesosphere.github.io/m ... -apps
madayang
赞同来自:
是了,谢谢
官网找半天没找到,原来在这里。慢慢研究下
徐磊 - BlackOps@Qunar
赞同来自:
-v
用volumes
-p
用portMappings
其他的都可以用
parameters
替代。