question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Need capability to copy files from running container to host

See original GitHub issue

Description

Unable to copy files in the target directory after tests have completed from container to host.

If this is already currently possible with the plugin, please let me know.

Info

  • d-m-p version : 0.20.1
  • Maven version (mvn -v) :
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T08:41:47-08:00)
Maven home: /Users/axiom/tools/JavaLib/main/build/apache-maven-3.3.9
Java version: 1.8.0_92, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.10.5", arch: "x86_64", family: "mac"
  • Docker version : 17.03.1-ce, build c6d412e

  • If it’s a feature request, what is your use case :

The use case I have is I’d like to copy the test results in my target directory in the post-integration-test phase from within the running container to the host.

Would be great if we could do something like this -

                 <executions>
                    <execution>
                        <id>copy</id>
                        <phase>post-integration-test</phase>
                        <configuration>
                            <fromContainerDirectory>./target/results/</fromContainerDirectory>
                            <toHostDirectory>./target/results</toHostDirectory>
                        </configuration>
                        <goals>
                            <goal>cp</goal>
                        </goals>
                    </execution>
                </executions>

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
testphreakcommented, Oct 26, 2020

@mabrarov reopened

1reaction
mabrarovcommented, Nov 13, 2020

I suggest to look at mabrarov/redis-builder for those who wants to try copy goal implemented in pull request #1405. mabrarov/redis-builder contains travis/settings.xml Maven configuration file which points to Bintray repository where d-m-p built from the pull request #1405 can be found:

<plugin>
    <groupId>io.fabric8</groupId>
    <artifactId>docker-maven-plugin</artifactId>
    <version>0.34-dev</version>
</plugin>
Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I 'docker copy' a file from container to host? | TechTarget
Here's a quick example of how to copy a file inside a Docker container to the local filesystem of the host machine.
Read more >
docker cp - Docker Documentation
The docker cp utility copies the contents of SRC_PATH to the DEST_PATH . You can copy from the container's file system to the...
Read more >
Copying Files to and from Docker Containers - GeeksforGeeks
You can use the docker cp command to copy the file. The first path (Source) is the path in the Docker Container and...
Read more >
How to copy files to Windows containers | TechTarget
You can copy files to Windows containers using the Docker CP command line, mounting a volume inside the container or downloading files from ......
Read more >
How to Use Docker Cp to Copy Files Between Host and ...
Each docker cp command needs one local filesystem path and one container path – you can't directly copy between two containers. Use a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found