X Tutup
Skip to content

Build image improvements#16

Merged
marcuslinke merged 3 commits intodocker-java:masterfrom
mocleiri:build-image-improvements
Jul 9, 2014
Merged

Build image improvements#16
marcuslinke merged 3 commits intodocker-java:masterfrom
mocleiri:build-image-improvements

Conversation

@mocleiri
Copy link
Copy Markdown
Contributor

@mocleiri mocleiri commented Jul 8, 2014

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.

mocleiri added 3 commits July 7, 2014 13:53
…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.
marcuslinke added a commit that referenced this pull request Jul 9, 2014
@marcuslinke marcuslinke merged commit 9e79aa6 into docker-java:master Jul 9, 2014
@marcuslinke
Copy link
Copy Markdown
Contributor

@mocleiri Thanks! Good work.

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