Update a test to use a base image with entrypoint to that the linux build
has at least one test that behaves like all the windows tests.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Previously this value was set at some point attrbitrarily between when it was updated and when it was going to be used next.
Instead always set it as the last step of dispatch.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Instead of mutating and reverting, just create a copy and pass the copy
around.
Add a unit test for builder dispatcher.run
Fix two test failures
Fix image history by adding a CreatedBy to commit options. Previously the
createdBy field was being created by modifying a reference to the runConfig that
was held from when the container was created.
Fix a test that expected a trailing slash. Previously the runConfig was being
modified by container create. Now that we're creating a copy of runConfig
instead of sharing a reference the runConfig retains the trailing slash.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Remove unused arguments to commit.
This will allow us to remove all the runConfig mutate+revert code that
is scattered around builder dispatchers/internals
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Redefine a better interface for remote context dependency.
Separate Dockerfile build instruction from remote context.
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Remove the block comment which is stale, and redundant now that the
function is just as readable as the comment.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Return dockerfile from parseDockerfile and pass the dockerfile nodes
as an arg
Strip unused arg from builder.NewBuilder.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Paths resolving to c:\ or c:\windows are forbidden
Replaced the obscure (and non-working) regex with a simple case
insensitive comparison to the black listed paths (we should forbid c:\,
c:\windows but not d:\)
Also, add a test ensuring paths are case insensitive on windows
Also, made sure existing multi-staged build tests pass on windows
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
This patch fixed below 4 types of code line
1. Remove unnecessary variable assignment
2. Use variables declaration instead of explicit initial zero value
3. Change variable name to underbar when variable not used
4. Add erro check and return for ignored error
Signed-off-by: Daehyeok Mun <daehyeok@gmail.com>
Signed-off-by: Ke Li <kel@splunk.com>
Add missing changes
Signed-off-by: Ke Li <kel@splunk.com>
User errors.New to create error
Signed-off-by: Ke Li <kel@splunk.com>
This fix tries to address the issue raised in 26453 where bad syntax
on dockerfile is not checked before building, thus user has to wait
before seeing error in dockerfile.
This fix fixes the issue by evaluating all the instructions and check
syntax before dockerfile is invoked actually.
All existing tests pass.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This fix tries to address the issue raised in 24912 where docker
build only consists of the current step without overall total steps.
This fix adds the overall total steps so that end user could follow
the progress of the docker build.
An additonal test has been added to cover the changes.
This fix fixes 24912.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
In order to keep a little bit of "sanity" on the API side, validate
hostname only starting from v1.24 API version.
Signed-off-by: Vincent Demeester <vincent@sbr.pm>