Docker compose and external images multi-stage builds

丶灬走出姿态 提交于 2019-12-06 02:45:22

I think you should be able to do that just fine.

docker-compose:

version: '3'
services:
    my-shared-build:
        image: my-shared-build:latest
        build: my-shared-build

    my-process-one:
        image: my-process-one:latest
        build: my-process-one
        depends_on:
            - my-shared-build

    my-process-two:
        image: my-process-two:latest
        build: my-process-two
        depends_on:
            - my-shared-build
            - my-process-one

Assuming your Dockerfiles are in subdirectories my-shared-build, my-process-one, my-process-two this should build all 3 images (in order)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!