X Tutup
Skip to content

Add a build command accepting a tar as a InputStream, so we can build the Dockerfile TAR on the fly without a temporary folder.#9

Merged
marcuslinke merged 1 commit intodocker-java:masterfrom
ydubreuil:build-from-tarstream
Jun 19, 2014
Merged

Add a build command accepting a tar as a InputStream, so we can build the Dockerfile TAR on the fly without a temporary folder.#9
marcuslinke merged 1 commit intodocker-java:masterfrom
ydubreuil:build-from-tarstream

Conversation

@ydubreuil
Copy link
Copy Markdown
Contributor

This PR allows to build a Dockerfile TAR on the fly using for example resources found in the classpath without requiring temporary copies...

I have a helper class which pipes the built TAR as a inputstream to feed this command if you are interested in.

Thanks for merging,
Yoann.

@marcuslinke
Copy link
Copy Markdown
Contributor

@ydubreuil Thanks! Any chance for a test case?

@ydubreuil
Copy link
Copy Markdown
Contributor Author

The best thing would be to refactor BuildImgCmd to inherit BuildImageFromStreamCmd as its code is just a cleanup of BuildImgCmd. I'm not sure how to do that properly, as the java generic model used doesn't allow inheritance of commands.

Any thought ?

@marcuslinke
Copy link
Copy Markdown
Contributor

Hmm. Maybe we could refactor BuildImgCmd to accept both File and InputStream in its constructors. The extra code to create a stream from the file/folder could be placed in the InputStream constructor.

…utStream, so we can build it on the fly without a temporary folder.
@ydubreuil
Copy link
Copy Markdown
Contributor Author

I've refactored BuildImgCmd following your idea.

marcuslinke added a commit that referenced this pull request Jun 19, 2014
Add a build command accepting a tar as a InputStream, so we can build the Dockerfile TAR on the fly without a temporary folder.
@marcuslinke marcuslinke merged commit 2bf3f82 into docker-java:master Jun 19, 2014
@marcuslinke
Copy link
Copy Markdown
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

X Tutup