layotto
layotto copied to clipboard
Layotto Dockerfile
In order to help users deploy Layotto with Docker, we want to provide a Docker image.
Considering that the configuration files in the Docker image are hard-coded, and users may extend their own configuration files and their own images, we can provide some basic Dockerfiles. When users want to extend image, they just write FROM xxx
.
Specifically, we need to prepare several Dockerfiles:
- A basic Dockerfile
- An example Docerfile for extension, that is,
FROM the basic Dockerfile
, and then change the configuration to extend.
Note: At present, the existing Dockerfiles in the build/contrib/builder/image
directory are used for quickstart demo, which have some hard code such as starting etcd, and there is no common base image.
chinese:
为了方便用户能够用Docker部署Layotto,我们想提供Docker镜像。
但考虑到Docker镜像里的配置文件都是写死的、用户可能会扩展自己的配置文件、自己的镜像,因此我们可以提供一些基础的Dockerfile,用户扩展的时候,写FROM xxx
即可。
具体来说,需要准备几个Dockerfile:
- 一个基础Dockerfile
- 一个进行扩展的示例Docerfile,即
FROM 基础Dockerfile
,然后改配置做扩展
注:目前已有的Dockerfile在build/contrib/builder/image
目录下,都是用于quickstart演示,里面写死了比如启动etcd,没有通用的基础镜像
Pls assign to me😃
Fine,tks for your contribution!
@seeflood 看了layotto的dockerfile,想着改成下面这样子会不会更好一点:
- 编写单纯只包含layotto的dockerfile,去掉supervisor、etcd等,同时将二进制文件的构建也放到dockerfile,而不是通过copy
- 支持通过环境变量指定配置文件,其他人可以通过步骤1构建的基础镜像编写新的dockerfile
- quick start 提供单独的运行脚本,etcd可作为依赖的组件通过运行脚本启动起来,类似dapr init
1.编写单纯只包含layotto的dockerfile,去掉supervisor、etcd等,同时将二进制文件的构建也放到dockerfile,而不是通过copy 2.支持通过环境变量指定配置文件,其他人可以通过步骤1构建的基础镜像编写新的dockerfile
@tianjipeng 好呀好呀
- quick start 提供单独的运行脚本,etcd可作为依赖的组件通过运行脚本启动起来,类似dapr init
不好意思我之前回微信的时候没细想,这里单独的运行脚本是指?是说写个shell脚本,把quickstart用到的所有存储系统(redis、etcd等)的镜像下载下来、启动么? 那么用户跑quickstart的操作路径是:
- 初始化,运行这个脚本(类似于敲
dapr init
),就会把quickstart用到的所有存储系统(redis、etcd等)的镜像下载下来、启动 - 按照quickstart文档的说明,启动Layotto
- 跑demo
是这样对吧?这里我担心每次跑quickstart时运行这个init脚本,会不会有端口冲突导致报错、用户产生困惑
这里我担心每次跑quickstart时运行这个init脚本,会不会有端口冲突导致报错、用户产生困惑
我重新看了quick start的文档,发现都是手动启动依赖,手动构建二进制执行文件再启动的,那这个第三个改动实际上可以先不需要?
@tianjipeng 对,第三条以后再说,反正用户跑quickstart的时候自己启动个etcd也没有多麻烦 :)