Commit Graph

174 Commits

Author SHA1 Message Date
1c38530502 Change url of robots.txt test to dockerproject.com
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 367e66e9721c33a64ab091bd5430ab4a9af12083
Component: engine
2015-01-05 11:13:37 -08:00
bc1cbc1f63 Fix TestBuildWithTabs for go 1.4
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: a31c14cadca4052a0a141347b322d825f56b814b
Component: engine
2014-12-21 13:49:45 +02:00
a9b8d39261 Allow for relative paths on ADD/COPY
Moved Tianon's PR from: https://github.com/docker/docker/pull/7870
on top of the latest code

Closes: #3936

Signed-off-by: Andrew Page <admwiggin@gmail.com>
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: f21f9f856e9d5af23521f131799028c2e67c04ed
Component: engine
2014-12-18 05:13:04 -08:00
6b6aa4bf22 Merge pull request #9643 from LK4D4/fix_vet_errors
Fix vet errors
Upstream-commit: 17cacf3326edde6d177e12132f74fc0174bda1d2
Component: engine
2014-12-16 12:04:15 -08:00
55ec358b5c Merge pull request #9610 from duglin/Issue9602
Wrap strings that could look like ints in quotes
Upstream-commit: eea9f0e781f5a2cc438aad11315253b6fb42ed9e
Component: engine
2014-12-16 12:02:26 -08:00
2187cf5beb Merge pull request #9122 from dqminh/debug-huge-expose
Expose a large number of ports should not slow down builder
Upstream-commit: a76f7c6ec32431b6cbf286d9be86f7dde0b3ac0d
Component: engine
2014-12-16 10:03:31 -08:00
ba3cc4bafb Wrap strings that could look like ints in quotes
When we use the engine/env object we can run into a situation where
a string is passed in as the value but later on when we json serialize
the name/value pairs, because the string is made up of just numbers
it appears as an integer and not a string - meaning no quotes.  This
can cause parsing issues for clients.

I tried to find all spots where we call env.Set() and the type of the
name being set might end up having a value that could look like an int
(like author). In those cases I switched it to use env.SetJson() instead
because that will wrap it in quotes.

One interesting thing to note about the testcase that I modified is that
the escaped quotes should have been there all along and we were incorrectly
letting it thru. If you look at the metadata stored for that resource you
can see the quotes were escaped and we lost them during the serialization
steps because of the env.Set() stuff.  The use of env is probably not the
best way to do all of this.

Closes: #9602

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: d942c59b696d16def85f6b65ae65c176f66a5562
Component: engine
2014-12-15 05:10:49 -08:00
50ca4df488 Add test to enforce volume build content
This tests ensures that the content from a dir within a build is carried
over even if VOLUME for that dir is specified in the Dockerfile.  This
test ensures this long standing functionality.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 4856ec075422a7926b62762749a7fbcc869efa99
Component: engine
2014-12-12 11:15:31 -08:00
bebcb13002 Fix vet errors about formatting directives
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: a7ae7fed7311551975d2bccb7417c328be3ea478
Component: engine
2014-12-12 10:58:56 -08:00
67b329feba Add integration test for xz path issue
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>

Conflicts:
	integration-cli/docker_cli_build_test.go
Upstream-commit: af2021955cb01507984cbd076edaf3caaf5b89b3
Component: engine
2014-12-11 16:29:15 -05:00
a013d9f804 Add build tests covering extraction in chroot
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: e4ba82d50ee4642412a1e1bdf43a7b94fadd2428
Component: engine
2014-12-11 16:26:52 -05:00
273d3a2f40 integ-cli: add test for links in volumes
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: a57eee2229c2f0c53c32372587fcc2a8327044ea
Component: engine
2014-12-11 16:26:52 -05:00
e6c672e7d3 integ-cli: add build test for absolute symlink
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: 7496cbbccc278c084620661812ed5f6390c1d2f1
Component: engine
2014-12-11 16:26:52 -05:00
dedefc8fcd Add another symlink breakout test
Signed-off-by: Tibor Vass <teabee89@gmail.com>

Conflicts:
	integration-cli/docker_cli_build_test.go
Upstream-commit: 0e71a48d4e89ce40c0ab94cc18599481d9e8a6b0
Component: engine
2014-12-11 16:26:51 -05:00
5231d38261 Fix permissions on ADD/COPY
Fix a regression introduced in PR#9467 when a single file was added or
copied.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: cfc24769a26e825e4267cbfdd59af807e27508b9
Component: engine
2014-12-10 11:09:03 -08:00
9923dcade2 Merge pull request #9467 from icecrime/9401-restrict_add_chown_scope
Reduce permissions changes scope after ADD/COPY
Upstream-commit: 64ebffe7b6e4a6732b3b6f56585bc8d01f4f8ed0
Component: engine
2014-12-09 10:40:23 -08:00
15957abc33 Reduce permissions changes scope after ADD/COPY
Permissions after an ADD or COPY build instructions are now restricted
to the scope of files potentially modified by the operation rather than
the entire impacted tree.

Fixes #9401.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: f3cedce3608afe7bd570666a7fc878ab85c7bc03
Component: engine
2014-12-04 17:16:22 -08:00
52bfe6086a Make 'docker build' send non-err output to stdout
Right now 'docker build' will send:
   Sending build context to Docker daemon
to stderr, instead of stdout.  This PR fixes that.

I looked in the rest of api/client/commands.go for other cases
that might do this and only one jumped out at me:
  https://github.com/docker/docker/blob/master/api/client/commands.go#L2202
but I think if I changed that to go to stdout then it'll mess people up
who are expecting just the container ID to be printed to the screen and
there is no --quiet type of flag we can check.

Closes #9404

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 5c91bb93a7e35b2d443090cabc7ec0a2ca59b6ee
Component: engine
2014-12-04 14:06:40 -08:00
9442c6a19e Remove unnessary abstraction deepEqual
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: fa753e67ae2bf573c9dfb1da1e1135c5ef5ef415
Component: engine
2014-12-03 17:52:06 -08:00
09af87d0eb remove deprecated cmd function in integration-cli
Remove deprecated cmd function in integration-cli
and change cmd to dockerCmd in all test files

Signed-off-by: Daehyeok Mun <daehyeok@gmail.com>
Upstream-commit: 7fbbd515b1018721e91199960d1933383a8262a1
Component: engine
2014-11-25 00:32:38 +09:00
8d3c39cea7 Merge pull request #9261 from unclejack/fix_test_tmp_cleanup
fix cleanup of /tmp in tests
Upstream-commit: 0f2de5158fe66b4906de176f90e3e6d813336450
Component: engine
2014-11-21 08:48:04 -08:00
f435c304cd Merge pull request #8251 from duglin/Issue2333
Add support for ENV of the form: ENV name=value ...
Upstream-commit: 58b6f31a7a3157b5ece418da0a976a28dae9841d
Component: engine
2014-11-20 13:12:24 -08:00
5dafd01fe8 Add support for ENV of the form: ENV name=value ...
still supports the old form: ENV name value

Also, fixed an issue with the parser where it would ignore lines
at the end of the Dockerfile that ended with \

Closes #2333

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 1314e1586f8cd6201c16161eb960a743c727946b
Component: engine
2014-11-20 09:54:28 -08:00
14c4bd0633 integ-cli: fix cleanup in build tests
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: db7fded17fd984fc3c854d1e34bd8d656c3b3692
Component: engine
2014-11-20 19:38:41 +02:00
865600707c Make sure integration-cli test clean up
Common patterns:
- Multiple images were built with same name but only one cleanup.
- Containers were deleted after images.
- Images not removed after retagging.

Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi)
Upstream-commit: da3d3b97ebe1e6fe1254367521c725ca12a5e61d
Component: engine
2014-11-19 23:41:46 +02:00
839ed3517e add test for exposing large number of ports
this test checks if exposing a large number of ports in Dockerfile properly
saves the port in configs. We dont actually expose a VERY large number of ports
here because the result is the same and it increases the test time by a few
seconds

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
Upstream-commit: 29be7b439ec4d0c8a54852ccbbe7b6bcf040e13f
Component: engine
2014-11-13 13:08:52 -05:00
52a61b3af6 add a test case for EXPOSE ports order
changing order of EXPOSE ports should not invalidate the cache as the content
doesnt change

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
Upstream-commit: 1e7ba09b60aa0bc527dc7e0159071a6d47796de4
Component: engine
2014-11-12 09:14:35 -05:00
0cba5a8261 Merge pull request #8716 from duglin/Issue8331
Use the HTTP Last-Modified http header as the mtime value for ADD cmd when present
Upstream-commit: 4fcd3dd7488ba779c48557e90598c81c94bf74e4
Component: engine
2014-11-10 13:03:57 -07:00
2f7c6a8c08 Use the HTTP Last-Modified http header as the mtime value for ADD cmd when present
Closes #8331

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 2e482c86bc14ddd4cfa45281dcf8f9ca141c9f14
Component: engine
2014-11-07 13:58:05 -08:00
07c8c2eea7 Fix vet errors
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: 18d9f1978b311ff9cadce9f0237313db14502f9f
Component: engine
2014-11-05 08:26:22 -08:00
d3c1cd34ce Merge pull request #8739 from duglin/CleanupDockerIgnores
Do some cleanup on .dockerignore paths
Upstream-commit: a85f58719f29f76f465747d095c85dbb8ba69d06
Component: engine
2014-11-03 16:05:24 -05:00
f115554d46 Do some cleanup on .dockerignore paths
While working on the fix for #8330 I noticed a few things:
1 - the split() call for the .dockerignore process will generate a blank
    "exclude".  While this isn't causing an issue right now, I got worried
	that in the future some code later on might interpret "" as something bad,
	like "everything" or ".".  So I added a check for an empty "exclude"
	and skipped it
2 - if someone puts "foo" in their .dockerignore then we'll skip "foo".
    However, if they put "./foo" then we won't due to the painfully
	simplistic logic of go's filepath.Match algorithm.  To help things
	a little (and to treat ./Dockerfile just like Dockerfile) I added
	code to filepath.Clean() each entry in .dockerignore.  It should
	result in the same semantic path but ensure that no matter how the
	user expresses the path, we'll match it.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: c0f0f5c9887032c606750b645001829d9f14f47c
Component: engine
2014-11-02 11:29:46 -08:00
b3f73f86dd builder: Restore /bin/sh handling in CMD when entrypoint is specified with JSON
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 24545c18c35620c211003561dc482d66ee6d0306
Component: engine
2014-10-27 21:50:22 +00:00
8aa0b668bd builder: whitelist verbs useful for environment replacement.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 4e74cd498b66e494b3336118a19c02000b282251
Component: engine
2014-10-27 17:38:25 +00:00
a3019fc24f builder: handle escapes without swallowing all of them.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: be49867cab663b5bdcf7804f3d2504f056db9db1
Component: engine
2014-10-27 17:38:24 +00:00
dc1bcb95a0 builder: some small fixups + fix a bug where empty entrypoints would not override inheritance.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: cdd6e97910c50e5766c8bec2121f906e9ee2d119
Component: engine
2014-10-24 00:23:25 +00:00
4efe32a77f builder: handle cases where onbuild is not uppercase.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: a34831f0168156ded7ecf96a1734c2735fede1ca
Component: engine
2014-10-21 20:17:37 +00:00
86ec0544b5 Add a testcase to make sure we don't squash tabs or convert them to spaces
This is in response to @SvenDowideit asking if we had a "tab" testcase
in https://github.com/docker/docker/issues/2315#issuecomment-58133508
I couldn't find one so I'm adding one

Closes #2315

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: c980fe09b77700fcaf47459e91a149876b7abef9
Component: engine
2014-10-17 15:52:48 -07:00
98837c45ee Merge pull request #8639 from erikh/fix_escapes
builder: fix escaping for ENV variables.
Upstream-commit: 75fd1b614dfd5acd36975357b51341585f89003c
Component: engine
2014-10-17 15:50:37 -07:00
6ef784efe2 builder: fix escaping for ENV variables.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: df0e0c76831bed08cf5e08ac9a1abebf6739da23
Component: engine
2014-10-17 21:47:35 +00:00
2e9533ccba Merge pull request #8415 from LK4D4/use_logs_in_builder
Use logs instead of attach for builder
Upstream-commit: 3c325f89e544415bafc23006ead0bdc21cab2f61
Component: engine
2014-10-17 13:32:13 -07:00
1ccc013586 Use logs instead of attach for builder
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: 6f09d064bd438ab4425d6105f40887f02bb9e97e
Component: engine
2014-10-17 13:20:02 -07:00
810883724d Rewrite TestBuildCopyDisallowRemote to not use fixtures
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: 98e7608b4cec04463781ccb314259873bbb56a16
Component: engine
2014-10-17 11:58:12 -07:00
50718a9b0f Rewrite TestBuildCopyEtcToRoot to not use fixtures
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: c8a5d56fd789b50b78ad58c07a535aaf01af77f7
Component: engine
2014-10-17 11:57:48 -07:00
7e037f1bad Rewrite TestBuildCopyWholeDirToRoot to not use fixtures
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: 6582ea574cfcd6cc8e3b1abebe7bfcc7aee05ece
Component: engine
2014-10-17 11:57:30 -07:00
5ab35b8993 Rewrite TestBuildCopyDirContentToExistDir to not use fixtures
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: 4a029259ff41c37eb72a6f221f9725f66491139f
Component: engine
2014-10-17 11:57:07 -07:00
3100829c7e Rewrite TestBuildCopyDirContentToRoot to not use fixtures
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: 832618afc6e6a8c489afb40f94340f158f9680c7
Component: engine
2014-10-17 11:56:49 -07:00
ff7999247d Rewrite TestBuildCopySingleFileToNonExistDir to not use fixtures
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: 24d83afd5203f93a22a3d95a212e9ec295aadc8b
Component: engine
2014-10-17 11:56:28 -07:00
f2d974c957 Rewrite TestBuildCopySingleFileToExistDir to not use fixtures
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: 2248109ff8607264ba40d4a4ac24bad66462d105
Component: engine
2014-10-17 11:56:01 -07:00
e5897b7fab Rewrite TestBuildCopySingleFileToWorkdir to not use fixtures
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: d41cba6aed1ffdda9c3e3441d720dab9afc3eb66
Component: engine
2014-10-17 11:55:34 -07:00