I have a simple docker file that runs a bash script. The bash script makes a new Results directory. The output of my script is deposited there. Logically, the Docker container exits when it finalizes running, and the outputs are not automatically moved to the host machine. Is there a sort of "reverse COPY" that will deposit the Results directory in my host directory? I plan to integrate the Dockerfile into a WDL, so I cannot get the container_id to use docker cp as described here.
FROM condaforge/mambaforge:22.9.0-1
COPY master.sh .
ENTRYPOINT ["/master.sh"]
And master looks like this
#!/bin/bash
mkdir Results
cat Data/data.txt > Results/results.txt
And the commands to build and run the docker container are:
docker build --platform linux/amd64 -t test:Dockerfile .
docker run -v /Path/To/Data:/Data --platform linux/amd64 -it test:Dockerfile bash