Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layotto Dockerfile #178

Closed
seeflood opened this issue Aug 13, 2021 · 7 comments
Closed

Layotto Dockerfile #178

seeflood opened this issue Aug 13, 2021 · 7 comments
Assignees
Labels
help wanted Extra attention is needed kind/enhancement New feature or request

Comments

@seeflood
Copy link
Member

seeflood commented Aug 13, 2021

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.

@seeflood
Copy link
Member Author

seeflood commented Aug 13, 2021

chinese:

为了方便用户能够用Docker部署Layotto,我们想提供Docker镜像。
但考虑到Docker镜像里的配置文件都是写死的、用户可能会扩展自己的配置文件、自己的镜像,因此我们可以提供一些基础的Dockerfile,用户扩展的时候,写FROM xxx即可。

具体来说,需要准备几个Dockerfile:

  • 一个基础Dockerfile
  • 一个进行扩展的示例Docerfile,即FROM 基础Dockerfile,然后改配置做扩展

注:目前已有的Dockerfile在build/contrib/builder/image目录下,都是用于quickstart演示,里面写死了比如启动etcd,没有通用的基础镜像

@seeflood seeflood added kind/enhancement New feature or request help wanted Extra attention is needed labels Aug 13, 2021
@seeflood seeflood changed the title Layotto Docker image Layotto Dockerfile Aug 13, 2021
@tianjipeng
Copy link
Member

Pls assign to me😃

@seeflood
Copy link
Member Author

Fine,tks for your contribution!

@tianjipeng
Copy link
Member

@seeflood 看了layotto的dockerfile,想着改成下面这样子会不会更好一点:

  1. 编写单纯只包含layotto的dockerfile,去掉supervisor、etcd等,同时将二进制文件的构建也放到dockerfile,而不是通过copy
  2. 支持通过环境变量指定配置文件,其他人可以通过步骤1构建的基础镜像编写新的dockerfile
  3. quick start 提供单独的运行脚本,etcd可作为依赖的组件通过运行脚本启动起来,类似dapr init

@seeflood
Copy link
Member Author

seeflood commented Sep 4, 2021

1.编写单纯只包含layotto的dockerfile,去掉supervisor、etcd等,同时将二进制文件的构建也放到dockerfile,而不是通过copy
2.支持通过环境变量指定配置文件,其他人可以通过步骤1构建的基础镜像编写新的dockerfile

@tianjipeng 好呀好呀

  1. quick start 提供单独的运行脚本,etcd可作为依赖的组件通过运行脚本启动起来,类似dapr init

不好意思我之前回微信的时候没细想,这里单独的运行脚本是指?是说写个shell脚本,把quickstart用到的所有存储系统(redis、etcd等)的镜像下载下来、启动么?
那么用户跑quickstart的操作路径是:

  1. 初始化,运行这个脚本(类似于敲dapr init),就会把quickstart用到的所有存储系统(redis、etcd等)的镜像下载下来、启动
  2. 按照quickstart文档的说明,启动Layotto
  3. 跑demo

是这样对吧?这里我担心每次跑quickstart时运行这个init脚本,会不会有端口冲突导致报错、用户产生困惑

@tianjipeng
Copy link
Member

tianjipeng commented Sep 4, 2021

这里我担心每次跑quickstart时运行这个init脚本,会不会有端口冲突导致报错、用户产生困惑

我重新看了quick start的文档,发现都是手动启动依赖,手动构建二进制执行文件再启动的,那这个第三个改动实际上可以先不需要?

@seeflood
Copy link
Member Author

seeflood commented Sep 5, 2021

@tianjipeng 对,第三条以后再说,反正用户跑quickstart的时候自己启动个etcd也没有多麻烦 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants