Build image improvements#16
Merged
marcuslinke merged 3 commits intodocker-java:masterfrom Jul 9, 2014
Merged
Conversation
…urces
Supports the case where the name of the file is supposed to be resolved using an
environment variable.
ENV VAR sub
ADD files/$VAR.dat /$VAR.dat
ADD files/${VAR}.dat /${VAR}.dat
In both cases the VAR is substituted for sub.
This allows the tar file creation process to capture the real source file.
The defaults remain 10 seconds for the read time out and to enable the LoggingFilter. Allows the caller to change the read time out and to disable the LoggingFilter For large images the logging filter spam's the console with the binary data that is being transferred. This new setting allows it to be turned off.
Contributor
|
@mocleiri Thanks! Good work. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I am supporting a developer workflow where the project and docker source files are located on a Windows or OSX host file system. Boot2Docker is running as a virtual box vm where the docker images are actually built and containers run.
I have a simple command line interface program that uses docker-java to submit the Dockerfile and related files through the remote api. All other docker commands are then handled on the VM.
The main change is support for variable substitution in the ADD or COPY resource names. I included a unit test which runs an example to verify that the substitution works.
I had some problems creating the test Dockerfile in windows in that it contained \r\n's which caused the \r to be attached to the destination file name. Hopefully as submitted here they are now fixed to have unix line endings of \n only.
The second commit adds the ability to control read time out and if the logging filter should be used. For my images I was getting way too much binary output during the upload with the LoggingFilter enabled.
I haven't tested the recent changes which changed it to SelectiveLoggingFilter but I think having an option to enable/disable is still valid.