Vincent Demeester
778e32a2fa
Merge pull request #31236 from tonistiigi/docker-stdin
...
build: accept -f - to read Dockerfile from stdin
2017-04-10 20:14:54 +02: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
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
Daniel Nephin
8cd6c30a48
Upadte archive.ReplaceFileTarWrapper() to not expect a sorted archive
...
Improve test coverage of ReplaceFileTarWrapper()
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-04-06 13:36:34 -04:00
David Sheets
3f6dc81e10
build: accept -f - to read Dockerfile from stdin
...
Heavily based on implementation by David Sheets
Signed-off-by: David Sheets <sheets@alum.mit.edu>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-04-05 19:42:31 -04:00
Tonis Tiigi
79ccb3478f
Add a multi stage trusted build testcase
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-04-04 09:56: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
Vincent Demeester
eeaa6c96d8
[test-integration] Migrate some more tests to cli
package
...
Add some required command operators to the `cli` package, and update
some tests to use this package, in order to remove a few functions
from `docker_utils_test.go`
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-03-28 15:17:31 +02:00
Tonis Tiigi
4c7710d5d0
Fix integration tests build errors
...
Caused by a merge conflict.
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-03-24 00:27:32 -07:00
Akihiro Suda
8008f65293
Merge pull request #31608 from vdemeester/integration-cli-package
...
[test-integration] Introduce a `cli` package for test-integration
2017-03-24 13:04:47 +09: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
Vincent Demeester
50c4475df6
Introduce a cli
package for test-integration
...
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-03-23 18:35:22 +01:00
Vincent Demeester
c497499cde
Merge pull request #31584 from dave-tucker/ignore-default-build-args
...
Exclude “default” build-args from image history
2017-03-22 10:07:22 +01:00
Tonis Tiigi
8f37715af2
Add testcase for build arg without value
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-03-21 18:59:42 -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
Tonis Tiigi
adeb3e3684
Fix inefficient file paths filter
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-03-08 18:59:25 -08:00
lixiaobing10051267
2276de8704
fix wrong foo to zzz in docker_cli_build_test.go
...
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
2017-03-01 17:49:54 +08: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
Antonio Murdaca
1cf4b2b8bd
image/cache: fix isValidParent logic
...
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-02-21 19:32:04 +01: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
John Howard
8eb0af1a0c
Windows: Temporarily disable TestBuildLastModified
...
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-02-09 18:13:20 -08:00
Vincent Demeester
ecbb0e62f6
Remove most of the runCommandWithOutput from integration tests
...
There is 5 calls left, that use StdinPipe that is not yet supported by
icmd.
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-30 10:54:06 +01:00
Aaron Lehmann
e9c0de0de6
Merge pull request #30043 from dmcgowan/distribution-reference-update-1
...
Distribution reference update
2017-01-24 20:38:20 -08:00
Vincent Demeester
e47c46c713
Run TestBuildCopyWilcardInName only on linux daemon and unix client
...
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-20 16:10:28 +01:00
Derek McGowan
0421f5173d
Remove use of forked reference package for cli
...
Use resolving to repo info as the split point between the
legitimate reference package and forked reference package.
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-01-19 16:04:50 -08:00
Vincent Demeester
c10f6ef43f
Clean more build utils in integration cli
...
- Remove deprecated buildImage* functions
- Rename buildImageNew to buildImage
- Use *check.C in fakeContext* setup and in getIdByName
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-17 15:42:38 +01:00
Vincent Demeester
c8016e669f
Use testEnv methods and remove most of the global variables
...
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-17 12:39:08 +01:00
Vincent Demeester
c778f4b964
Refactor docker_cli_build_test.go
...
Use `testutil/cmd` for `buildCommand`.
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-15 16:48:08 +01:00
Brian Goff
7d24cc7710
Merge pull request #29856 from Microsoft/jjh/warntoout
...
Windows to Linux build warning to stdout
2017-01-14 16:37:31 -05: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
Brian Goff
bf71db7a12
Merge pull request #30010 from thaJeztah/master-revert-27146
...
Revert "Require continuation char to be last char in a line"
2017-01-12 09:17:08 -05:00
Sebastiaan van Stijn
e5058ff15c
Merge pull request #29947 from vdemeester/integration-some-runCommandWithOutput-clean
...
[test-integration] clean some runCommandWithOutput
2017-01-10 15:56:42 +01: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
Vincent Demeester
303b1d200a
Update trustedCmd to be compatible with testutil/cmd
...
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-09 11:07:05 +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
John Howard
528a5fd2ba
Windows: Enable TestBuildWorkdirImageCmd
...
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-01-04 15:33:40 -08:00
John Howard
d45c652e83
Windows to Linux build warning to stdout
...
Signed-off-by: John Howard <jhoward@microsoft.com>
When building a Dockerfile from a Windows client on a Linux daemon, a
"security warning" is printed
on stderr. Having this warning printed on stderr makes it difficult to
distinguish a failed build from one that's succeeding, and the only way to
suppress the warning is through the -q option, which also suppresses every
output. This change prints the warning on stdout, instead of stderr, to
resolve this situation.
2017-01-03 14:07:50 -08:00
Vincent Demeester
bc19388fb2
Updates some integration tests to fix userns builds
...
- `TestRunMountReadOnlyDevShm` and `TestRunHostnameInHostMode` needs
`NotUserNamespace` requirement as these are known limitation of
userns.
- `TestBuildWorkdirCmd` should use a preload image (`busybox`) instead
of one that require network access.
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-02 19:13:26 +01:00
Sebastiaan van Stijn
ed689c48b0
Merge pull request #29799 from vdemeester/integration-registry-package
...
[test-integration] Add a registry package with registry v1/v2 code
2017-01-02 15:37:09 +01:00
Vincent Demeester
4300e5e881
Add a registry package with registry v1/v2 code
...
This extract what was in registry_test.go and
registry_mock_test.go. This also move `RegistryHosting`
requirement to `registry.Hosting`
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-02 11:03:53 +01:00
Vincent Demeester
33968e6c7d
Remove pkg/integration and move it to testutil or integration-cli
...
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-12-30 18:26:34 +01:00
Sebastiaan van Stijn
021710fcdf
Merge pull request #29371 from vdemeester/clean-integration-utils
...
[test-integration] Clean utils.go from most of its content
2016-12-29 09:28:46 +01:00