Commit Graph

10 Commits

Author SHA1 Message Date
Tibor Vass f41230b93a Move builder files to builder/dockerfile
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-10-05 18:26:47 -04:00
Madhav Puri 54240f8da9 Support for passing build-time variables in build context
- The build-time variables are passed as environment-context for command(s)
run as part of the RUN primitve. These variables are not persisted in environment of
intermediate and final images when passed as context for RUN. The build environment
is prepended to the intermediate continer's command string for aiding cache lookups.
It also helps with build traceability. But this also makes the feature less secure from
point of view of passing build time secrets.

- The build-time variables also get used to expand the symbols used in certain
Dockerfile primitves like ADD, COPY, USER etc, without an explicit prior definiton using a
ENV primitive. These variables get persisted in the intermediate and final images
whenever they are expanded.

- The build-time variables are only expanded or passed to the RUN primtive if they
are defined in Dockerfile using the ARG primitive or belong to list of built-in variables.
HTTP_PROXY, HTTPS_PROXY, http_proxy, https_proxy, FTP_PROXY and NO_PROXY are built-in
variables that needn't be explicitly defined in Dockerfile to use this feature.

Signed-off-by: Madhav Puri <madhav.puri@gmail.com>
2015-09-16 03:31:15 -07:00
Michal Minar 210ab030bc Format error by value
- Use `%v` verb to format errors.
- Give `param` constant in portallocator some better name.

Signed-off-by: Michal Minar <miminar@redhat.com>
2015-03-16 12:05:53 +01:00
Sebastiaan van Stijn 9e63b0d0f9 cleanup: simplify parser_test
parser_test only needed the directory-names for
the tests to run. This replaces f.Readdir() with
f.Readdirnames() to only return the names.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2015-03-10 00:55:00 +01:00
Tianon Gravi f6cb1ea85a Simplify builder TestTestData slightly by using ioutil.ReadFile instead of os.Open+ioutil.ReadAll
Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2015-01-02 22:38:52 -07:00
Doug Davis f440c6b224 Fix builder/parser so it keeps some whitespace on split lines.
If previous line ends with whitespace, or next line starts with whitepsace
we need to preserve a space otherwise things line:
RUN echo\
   hello
will appear as: RUN echohello

Noticed this while looking at #5744 because he had lines ending in &&\

Signed-off-by: Doug Davis <dug@us.ibm.com>
2014-10-03 20:33:12 -07:00
Erik Hollensbe 6b322ad2d3 builder/parser: fix handling of empty strings as the only argument.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-09-11 06:00:24 -07:00
Erik Hollensbe 21b15ac920 builder: handle certain classes of JSON errors gracefully
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-08-27 18:52:30 -07:00
Erik Hollensbe 4122a981ae builder: negative test support, fix for shykes's broken dockerfile
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-08-27 18:52:30 -07:00
Erik Hollensbe 22c46af4b3 builder: parser and beginnings of the evaluator
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-08-27 18:52:29 -07:00