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>
This fix tries to fix the issue in 29619 where
labels passed from `build --labels` are not sorted.
As a result, if multiple labels have been passed,
each `docker build --labels A=A --labels B=B --labels C=C`
will generate different layers.
This fix fixes the issue by sort the Labels before
they are concatenated to `LABEL ...`.
A unit test has been added to cover the changes
This fix fixes 29619.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>