简体   繁体   English

Google Cloud Container:从Dockerfile创建Docker容器

[英]Google Cloud Container: Create a docker container from a Dockerfile

Is it possible to create a docker container in a Google Container Engine cluster, using a dockerfile , which builds an image on-the-fly and deploy in cluster, rather than creating an image first and uploading it to a Google Container Registry, and then using it from there? 是否可以使用dockerfile在Google Container Engine集群中创建dockerfile ,该文件可动态生成映像并在集群中部署,而不是先创建映像并将其上传到Google Container Registry,然后再将其上传从那里使用它?

I feel like that is cumbersome, and there should be a way to create containers in cluster directly using a dockerfile. 我觉得这很麻烦,应该有一种方法可以直接使用dockerfile在集群中创建容器。

It is not possible to do this in Google Container Engine. 在Google Container Engine中无法执行此操作。 Google Container Engine is designed to help orchestrate container deployment and does not itself provide a source -> deployment workflow. Google Container Engine旨在帮助协调容器的部署,它本身并不提供源->部署工作流。

You may want to look at Google App Engine or Openshift 3 (which is built on Kubernetes) as a more fully featured platform-as-a-service offering. 您可能希望将Google App EngineOpenshift 3 (基于Kubernetes构建)视为功能更全面的平台即服务产品。

You can also build this type of tooling on top of a Google Container Engine cluster yourself as all of the building blocks are available. 您还可以自己在Google Container Engine集群的顶部构建此类工具,因为所有构建块都可用。

One service to take a look at when constructing a workflow is Google Container Builder , which can simplify the process of building a container from source and pushing it to Google Container Registry. 构造工作流时要查看的一项服务是Google Container Builder ,它可以简化从源代码构建容器并将其推送到Google Container Registry的过程。

It is currently a fairly low level service, but offers some advantages for environments where it may be impractical to run docker build locally. 它目前是一个较低级别的服务,但对于在本地运行docker build可能不切实际的环境提供了一些优势。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从Google Cloud访问Docker容器 - Access Docker Container from Google Cloud Google Cloud-从GCR部署为容器-端口未在Docker容器中公开 - Google Cloud - Deploy as Container from GCR - Ports not exposed in docker container 为什么 docker 必须从 dockerfile 创建映像,然后从映像创建容器,而不是从 Dockerfile 创建容器? - Why does docker have to create an image from a dockerfile then create a container from the image instead of creating a container from a Dockerfile? 根据Google Cloud Container中容器的更改创建新图像 - Create a new image from a container’s changes in Google Cloud Container 从Dockerfile在Docker容器中启动多个进程 - start multiple processes in docker container from Dockerfile 是否可以从docker容器中提取Dockerfile - Is it possible to extract the Dockerfile from a docker container Docker(Dockerfile):从主机到容器共享目录 - Docker (Dockerfile): Share a directory from host to container 将主机文件添加到Docker容器-来自Dockerfile - Adding host file to docker container - from Dockerfile 使用身份验证从Dockerfile运行Redis Docker容器 - Run redis docker container from Dockerfile with authentication 将文件从 Docker 容器上传到 Google Cloud Storage - File upload from Docker container to Google Cloud Storage
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM