My containers should share the same source code folder.
But they should build from different Dockerfiles.
Is it possible to build them with docker-compose and build from different Dockerfiles at a time?
I wish there is a syntax like
build: . -f <<Dockerfile_ABC>
build: . -f <<Dockerfile_CDE>
abc:
build: . -f <<Dockerfile_ABC>
environment:
- PROJECT=abc
command: ruby abc/abc.rb
volumes:
- ./:/working_direcotry
ports:
- 5904:5904
cde:
build: . -f <Dockerfile_CDE>
environment:
- PROJECT=cde
command: ruby cde/cde.rb
volumes:
- ./:/working_direcotry
ports:
- 5902:5902
Just specify the name of the Dockerfile: