title: how to copy file from docker container to host using shell script?
body: <p>I have created an image, which is an automation project. when I run container it executes all test inside the container then it generates the test report. I want to take this report out before deleting container. </p>
  
  <pre><code>    FROM maven:3.6.0-ibmjava-8-alpine
  
  COPY ./pom.xml .
  
  ADD ./src $HOME/src
  
  COPY ./test-execution.sh /
  
  RUN mvn clean install -Dmaven.test.skip=true -Dassembly.skipAssembly=true
  
  ENTRYPOINT ["/test-execution.sh"]
  
  CMD []
  </code></pre>
  
  <p>Below is shell file </p>
  
  <pre><code> #!/bin/bash
  
  echo parameters you provided : "$@" 
  
  mvn test "$@"
  
  cp api-automation:target/*.zip /Users/abcd/Desktop/docker_report
  </code></pre>