I have two docker images. One of the docker image (from first container), when ran, generates some files, which needs to be consumed by the another container.
Can I do this?
I have two docker images. One of the docker image (from first container), when ran, generates some files, which needs to be consumed by the another container.
Can I do this?
Rene's answer works, but you could share data without using the host's directory (container1 ==> container2):
It's very simple. You have to share one directory to two different containers, then have both access to the same data in that directory.
Oracle had a an example on their website in 2015 (which is not available any more). Based on this i created
https://github.com/BITPlan/docker-stackoverflowanswers/tree/master/33232991
Dockerfile.data
for the data image and
Dockerfile
for the image to test the use of the other data only volume.
builds these images
and they both show in my images list now:
running and testing is done with
which shows: