I have 3 services that should run from the same codebase but they run in different containers in production.
(我有3个服务应从相同的代码库运行,但它们在生产环境中的不同容器中运行。)
I want to create one Dockerfile with the same "build" layer with the necessary commands and tools to run the services and create each service a Dockerfile with the extended "build" layer.(我想用必要的命令和工具创建一个具有相同“构建”层的Dockerfile,以运行服务,并为每个服务创建一个具有扩展“构建”层的Dockerfile。)
I read about the multistage layer but I saw examples only in the same file so it still makes my code decoupled.(我读到了有关多级层的信息,但仅在同一文件中看到了示例,因此仍然使我的代码脱钩。)
Do you have any suggestions to overcome this?
(您有什么建议可以克服吗?)
ask by Tamir Ohana translate from so