Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy directory doesn't work with 'ImageFromDockerfile.withFileFromPath(...)' #285

Closed
tourea opened this issue Feb 1, 2017 · 6 comments
Closed
Assignees
Labels

Comments

@tourea
Copy link
Contributor

tourea commented Feb 1, 2017

In my Dockerfile, I have something similar to:
COPY ./folder /path/to, where folder is a directory.
When I try to start a generic container (using ImageFromDockerfile), I get an exception in ImageFromDockerfile:

Caused by: java.lang.RuntimeException: Can't transfer file ...
  at org.testcontainers.images.builder.traits.FilesTrait$1.transferTo(FilesTrait.java:43)
  ...
Caused by: java.io.IOException: Is a directory
@rnorth
Copy link
Member

rnorth commented Feb 2, 2017

Ouch - sorry. Let's try and solve this with #279, which gives us a good chance to clean up file/resource handling for good.

@rnorth rnorth self-assigned this Feb 2, 2017
@rnorth
Copy link
Member

rnorth commented Feb 19, 2017

Hi @tourea
Sorry it's taken a while to give you an update on this - it's turned out quite a bit harder than I initially thought. However, I have some draft code on a branch which allows recursive copying of files in.

You can see an example here.

I'll keep working on this and tidying up - if you really want to try it in the meantime you could use jitpack to obtain a branch build (https://jitpack.io/#testcontainers/testcontainers-java/285-recursive-tar-copy-SNAPSHOT should work)

@bsideup FYI - this branch is too messy to deserve review yet. However, you might want to know that (so far) I had to make some fairly big changes to Transferable to allow enough flexibility for recursively populating the context TAR. I will make some further changes to the interface hierarchy, but thought I should give you a heads-up.

Richard

@rnorth
Copy link
Member

rnorth commented Mar 13, 2017

This change is getting closer to being ready; I'd hope to get it released soon. Sorry for the long wait on this.

@dbyron0
Copy link
Contributor

dbyron0 commented Apr 14, 2017

The 'This change' link in your comment (https://github.com/testcontainers/testcontainers-java/issues/!313) doesn't work for me. This one does though.

@stale
Copy link

stale bot commented Oct 28, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe this is a mistake, please reply to this comment to keep it open. If there isn't one already, a PR to fix or at least reproduce the problem in a test case will always help us get back on track to tackle this.

@stale stale bot added the stale label Oct 28, 2018
@rnorth
Copy link
Member

rnorth commented Oct 28, 2018

Support for this was added in #313 so I shall close.

@rnorth rnorth closed this as completed Oct 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants