[英]Running docker image on pivotal cloud foundry
I have an application that is running in a docker container. 我有一个在Docker容器中运行的应用程序。 Is it possible to deploy this docker container containing the application in Cloud Foundry without making any changes to the application or container itself? 是否可以在Cloud Foundry中部署包含应用程序的docker容器,而无需对应用程序或容器本身进行任何更改?
To answer your specific question about whether you will need to make changes to your Docker image or not, here's the relevant info. 要回答有关是否需要更改Docker映像的特定问题,请参阅以下相关信息。
docker run
workflow normally involves that you will have to wait. 当前不支持挂载卷或链接容器,但是支持这些用例的项目正在积极进行中,因此,如果您的docker run
工作流程通常涉及您,则必须等待。 (Info filtered from official CF docs site and Diego design notes ) (信息从官方CF docs网站和Diego设计说明中筛选出)
As discussed on Cloud Foundry's documentation , you should first enable the diego_docker
feature flag with the following command: 如Cloud Foundry 文档中所述 ,您首先应使用以下命令启用diego_docker
功能标记:
cf enable-feature-flag diego_docker
Then use the cf push
in order to push your docker image. 然后使用cf push
来推送您的docker映像。 Versions 6.13.0
and later of the CF CLI include native support for pushing a Docker image as a CF app, with the cf push
command's -o
or --docker-image
flags. CF CLI 6.13.0
和更高版本包括对cf push
命令的-o
或--docker-image
标志将Docker映像作为CF应用程序推送的本机支持。 For example, running: 例如,运行:
cf push lattice-app -o cloudfoundry/lattice-app
will push the image located at cloudfoundry/lattice-app
. 将推送位于cloudfoundry/lattice-app
的图像。 You can also read here for more information about Docker Support in CF + Diego. 您还可以在此处阅读有关CF + Diego中的Docker支持的更多信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.