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
Justin Cormack
f8119bb7a7
Remove sqlite
...
This drops support for migrations from pre-1.10 Docker versions, which
should be done via an external tool or an intermediate upgrade.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-18 12:27:21 +00:00
Daehyeok Mun
6306019d0b
Refactoring ineffectual assignments
...
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>
2017-01-13 00:27:01 -07:00
Brian Goff
597843e790
Merge pull request #30039 from ripcurld0/specify_line_no_dockerfile_err
...
Specify in which line the Dockerfile parser failed
2017-01-12 19:48:45 -05:00
Boaz Shuster
8f282cdea5
Specify in which line the Dockerfile parser failed
...
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
2017-01-12 17:45:45 +02:00
Sebastiaan van Stijn
c67550414b
Revert "Require continuation char to be last char in a line"
...
This reverts commit 105bc63295
,
which (although correct), resulted in a backward incompatible
change.
We can re-implement this in future, after this changes goes
through a deprecation cycle
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-01-10 00:41:03 +01:00
Tonis Tiigi
e160860054
Fix workdir cache invalidation
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-01-06 12:10:59 -08:00
Sebastiaan van Stijn
d6be0e9802
Merge pull request #28631 from likel/master
...
Don't do format if it's unnecessary
2016-12-30 01:13:12 +01:00
Tõnis Tiigi
aacc2c8880
Merge pull request #29624 from yongtang/29619-build-label-order
...
Sort the labels passed from `build --labels`
2016-12-29 15:09:53 -08:00
Brian Goff
a2b12b5e82
Merge pull request #29679 from yongtang/29667-docker-build-workdir-cmd
...
Fix image's `CMD` after `WORKDIR` in Dockerfile
2016-12-28 20:26:59 -05:00
allencloud
6fb05778ba
fix nits in comments
...
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-12-27 23:30:50 +08:00