Daniel Nephin
64c4c1c3d5
Keep parser.Directive internal to parser
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-04-12 14:48:09 -04:00
Daniel Nephin
bb429da9a9
Hide builder.parser.Directive internals
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-04-12 14:48:09 -04:00
Tõnis Tiigi
d2ab40e5b9
Merge pull request #32532 from dnephin/refactor-some-builder-parts
...
[builder] cleanup env dispatcher and Builder.build()
2017-04-12 11:11:06 -07:00
Vincent Demeester
3c07259882
Merge pull request #32370 from AkihiroSuda/improve-build-error
...
builder/dockerfile: improve error message about build stage name
2017-04-12 16:33:23 +02:00
Akihiro Suda
50a9be4bf5
builder/dockerfile: improve error message about build stage name
...
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-04-12 05:27:39 +00:00
Daniel Nephin
068f344e03
Remove unused Builder.Cancel()
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-04-11 20:33:13 -04:00
Daniel Nephin
a6abd57b83
Remove unused id field from Builder.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-04-11 14:44:32 -04:00
Daniel Nephin
bfcd95817a
Factor out functions from builder/dockerfile/builder.go:Builder.build()
...
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>
2017-04-11 14:44:32 -04:00
Daniel Nephin
c7fad9b750
Cleanup in dispatcher.env
...
Remove commented code blocks
Remove some duplication in comparing and restructuring env
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-04-11 14:44:28 -04:00
Akihiro Suda
b764c471bf
Merge pull request #32495 from dnephin/cleanup-builder-dispatcher-env
...
Remove Builder.dockerfile field
2017-04-11 14:50:55 +09:00
Tonis Tiigi
33e07f41ad
builder: add an option for specifying build target
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-04-10 16:21:43 -07:00
Daniel Nephin
f3e205ddc1
Remove the dockerfile field from Builder.
...
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>
2017-04-10 18:09:17 -04:00
Daniel Nephin
4d9e32a08e
Merge pull request #31352 from dnephin/allow-arg-in-fromt
...
[dockerfile] Allow ARG in FROM
2017-04-10 13:23:40 -04:00
Daniel Nephin
239c53bf83
Refactor BuildArgs
...
Add MetaArgs for ARG that occur before the first FROM
Integration test for these cases.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-04-07 17:57:47 -04:00
Daniel Nephin
9b4aa7629c
Fix arg in from when arg is not defined
...
Add mock builder backend
Add tests for ARG in FROM
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-04-07 17:57:47 -04:00
Daniel Nephin
f0a9c2e3f4
Allow ARG to come before FROM to support variables in FROM.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-04-07 17:57:47 -04:00
Simon Ferquel
b0e7588873
Test and fix forbidden path for COPY --from on Windows
...
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>
2017-04-07 18:00:36 +02:00
Elias Faxö
e401f63735
Added start period option to health check.
...
Signed-off-by: Elias Faxö <elias.faxo@gmail.com>
2017-04-06 12:35:34 +02:00
Victor Vieux
2e96c1739b
Merge pull request #32063 from tonistiigi/named-contexts
...
Add support for named build stages
2017-04-04 12:53:59 -07:00
Tõnis Tiigi
6abbc933ae
Merge pull request #31750 from dnephin/some-builder-cleanup
...
Fix `docker build --label` when the label includes single quotes and a space
2017-04-04 09:37:00 -07:00
Tonis Tiigi
672ea30a94
Add support for FROM
using named block
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-04-04 09:34:28 -07:00
Tonis Tiigi
73b4b8ed7f
Implicit copy-from with reference
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-04-04 09:34:28 -07:00
Tonis Tiigi
87512bbc84
Add named context support
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-04-04 09:34:28 -07:00
Tonis Tiigi
a1fa59ea12
builder: Fix setting command with custom shell
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-03-30 13:29:21 -07:00
Alexandre Garnier
d005219830
Display created tags on successful build
...
Signed-off-by: Alexandre Garnier <alexandre.garnier@zenika.com>
Signed-off-by: Alexandre Garnier <zigarn@gmail.com>
2017-03-25 11:46:20 +01:00
Daniel Nephin
434d77bc0e
Fix --label being env var expanded.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-03-24 12:29:14 -04:00
Daniel Nephin
726fb269cf
Fix --label on docker build when a single quote is used in the value
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-03-24 12:29:14 -04:00
Daniel Nephin
d7807c7316
Refactor some builder code
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-03-24 12:29:14 -04:00
Tõnis Tiigi
2fa8fe400d
Merge pull request #31257 from tonistiigi/nested-build
...
build: add multi-stage build support
2017-03-23 19:14:13 -07:00
Tonis Tiigi
f95f58283b
Add support for COPY from previous rootfs
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-03-23 15:12:15 -07:00
Dave Tucker
89a2a885c8
Ignore built-in allowed build-args in image history
...
Removes the build-args from the image history if they are in the
BuiltinAllowedBuildArgs map unless they are explicitly defined in an ARG
instruction.
Signed-off-by: Dave Tucker <dt@docker.com>
2017-03-21 16:36:48 +00:00
Tonis Tiigi
acad599210
Fix cache for dockerfiles with multiple FROM
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-03-20 11:24:50 -07:00
Tonis Tiigi
09f308ce21
Fix ARG scoping for Dockerfiles with multiple FROM
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-03-20 11:24:44 -07:00
fate-grand-order
2b79dbc89b
fix misspell in utils.go
...
Signed-off-by: Helen Xie <chenjg@harmonycloud.cn>
2017-03-20 19:52:00 +08:00
Daniel Nephin
9ea5e02e92
extract a function
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-03-08 11:46:09 -05:00
Sebastiaan van Stijn
fb1890fb95
Merge pull request #31177 from allencloud/donot-allow-subsecond-in-dockerfile-healthcheck
...
do not allow sub second in healthcheck options in Dockerfile
2017-03-08 15:18:09 +01:00
Sebastiaan van Stijn
a64ea37753
Merge pull request #30383 from TDAbboud/30096-add-host-docker-build
...
Add --add-host for docker build
2017-02-27 12:42:18 +01:00
Akihiro Suda
a6576b8a2b
Merge pull request #31212 from fate-grand-order/fixed
...
use t.Fatal() to output the err message and fix typo
2017-02-27 12:26:35 +09:00
Daniel Nephin
6e005fd5cc
Refactor to remove duplicate code around BuildArgs.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-02-24 16:22:32 -05:00
fate-grand-order
2a8d6368d4
use t.Fatal() to output the err message where the values used for formatting
...
text does not appear to contain a placeholder
Signed-off-by: Helen Xie <chenjg@harmonycloud.cn>
2017-02-23 10:16:22 +08:00
Reficul
9b1ceecd8a
fix wrong print format
...
Signed-off-by: Reficul <xuzhenglun@gmail.com>
2017-02-21 10:26:06 +08:00
Tony Abboud
7a962e4577
Add --add-host for docker build
...
Signed-off-by: Tony Abboud <tdabboud@hotmail.com>
2017-02-20 17:32:28 -05:00
allencloud
63811a82b6
do not allow sub second in healthcheck options in Dockerfile
...
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-02-20 15:47:34 +08:00
Aaron.L.Xu
f8a4047796
why there are so many mistakes in our repo (up to /cmd)
...
Signed-off-by: Aaron.L.Xu <likexu@harmonycloud.cn>
2017-02-17 00:32:48 +08:00
Tonis Tiigi
0f293f9eb3
Reset stdin config before running build actions
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-02-15 11:49:17 -08:00
Vincent Demeester
254fc83cba
Merge pull request #30457 from dmcgowan/distribution-reference-update-2
...
reference: use distribution reference and remove fork
2017-02-07 22:01:25 +01:00
Derek McGowan
3a1279393f
Use distribution reference
...
Remove forked reference package. Use normalized named values
everywhere and familiar functions to convert back to familiar
strings for UX and storage compatibility.
Enforce that the source repository in the distribution metadata
is always a normalized string, ignore invalid values which are not.
Update distribution tests to use normalized values.
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-02-07 11:08:37 -08:00
Daniel Nephin
80b642ff88
Ignore the daemon log config when building images.
...
Logs created by build containers should be handled by the daemon, not by logging drivers.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-30 10:59:19 -05:00
Anthony Sottile
2283cd0203
Remove unnecessary if in parser.Dump
...
Signed-off-by: Anthony Sottile <asottile@umich.edu>
2017-01-28 23:07:24 -08:00
Brian Goff
0e8c7d7277
Merge pull request #30208 from justincormack/no-sqlite
...
Remove sqlite dependency
2017-01-18 13:15:38 -05:00