Commit graph

142 commits

Author SHA1 Message Date
Erik Hollensbe
24545c18c3 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)
2014-10-27 21:50:22 +00:00
Erik Hollensbe
4e74cd498b builder: whitelist verbs useful for environment replacement.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-10-27 17:38:25 +00:00
Erik Hollensbe
be49867cab builder: handle escapes without swallowing all of them.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-10-27 17:38:24 +00:00
Erik Hollensbe
cdd6e97910 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)
2014-10-24 00:23:25 +00:00
Erik Hollensbe
a34831f016 builder: handle cases where onbuild is not uppercase.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-10-21 20:17:37 +00:00
Doug Davis
c980fe09b7 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>
2014-10-17 15:52:48 -07:00
Alexandr Morozov
75fd1b614d Merge pull request #8639 from erikh/fix_escapes
builder: fix escaping for ENV variables.
2014-10-17 15:50:37 -07:00
Erik Hollensbe
df0e0c7683 builder: fix escaping for ENV variables.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-10-17 21:47:35 +00:00
Jessie Frazelle
3c325f89e5 Merge pull request #8415 from LK4D4/use_logs_in_builder
Use logs instead of attach for builder
2014-10-17 13:32:13 -07:00
Alexandr Morozov
6f09d064bd Use logs instead of attach for builder
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-10-17 13:20:02 -07:00
Alexandr Morozov
98e7608b4c Rewrite TestBuildCopyDisallowRemote to not use fixtures
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-10-17 11:58:12 -07:00
Alexandr Morozov
c8a5d56fd7 Rewrite TestBuildCopyEtcToRoot to not use fixtures
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-10-17 11:57:48 -07:00
Alexandr Morozov
6582ea574c Rewrite TestBuildCopyWholeDirToRoot to not use fixtures
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-10-17 11:57:30 -07:00
Alexandr Morozov
4a029259ff Rewrite TestBuildCopyDirContentToExistDir to not use fixtures
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-10-17 11:57:07 -07:00
Alexandr Morozov
832618afc6 Rewrite TestBuildCopyDirContentToRoot to not use fixtures
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-10-17 11:56:49 -07:00
Alexandr Morozov
24d83afd52 Rewrite TestBuildCopySingleFileToNonExistDir to not use fixtures
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-10-17 11:56:28 -07:00
Alexandr Morozov
2248109ff8 Rewrite TestBuildCopySingleFileToExistDir to not use fixtures
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-10-17 11:56:01 -07:00
Alexandr Morozov
d41cba6aed Rewrite TestBuildCopySingleFileToWorkdir to not use fixtures
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-10-17 11:55:34 -07:00
Alexandr Morozov
83c5dced10 Rewrite TestBuildCopySingleFileToRoot to not use fixtures
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-10-17 11:55:04 -07:00
Alexandr Morozov
e45c92153d Rewrite TestBuildCopyAddMultipleFiles to not use fixtures
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-10-17 11:54:29 -07:00
Jessie Frazelle
5a20dc67b0 Merge pull request #8567 from LK4D4/add_log_done
Add logDone for TestBuildAddSingleFileToNonExistDir
2014-10-17 11:20:12 -07:00
Jessie Frazelle
09ceae5c9c Merge pull request #8486 from duglin/Issue5701
Add failing testcase for single quotes in CMD
2014-10-17 11:11:49 -07:00
Jessica Frazelle
b1e3c9e9cd Cleanup errorOut resp in build tests
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-10-16 15:06:20 -07:00
Doug Davis
9edf967824 Add failing testcase for single quotes in CMD
Closes #5701

This is due to @SvenDowideit comment at: https://github.com/docker/docker/issues/5701#issuecomment-58133541
where he asked for a testcase showing the error case.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2014-10-16 14:40:55 -07:00
Alexandr Morozov
fcfe80f633 Minor fix of tests names
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-10-14 11:47:01 -07:00
Alexandr Morozov
fbaa41b5aa Add logDone for TestBuildAddSingleFileToNonExistDir
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-10-14 11:17:41 -07:00
Tianon Gravi
24189b2c36 Fix builder from being over-aggressive on ${}
`${SOME_VAR%pattern}` was turning into `SOME_VAL%pattern}` which the shell would then balk at.

I've updated the `TOKEN_ENV_INTERPOLATION` regex to account for this (ie, if `${` is used, it _must_ also match the closing `}`), and renamed the variable to not be exported (since it's not used outside the function following it).

I also added comments for the bits of `tokenEnvInterpolation` so they're easier to follow. 😄

Signed-off-by: Andrew Page <admwiggin@gmail.com>
2014-10-14 00:58:55 -06:00
Erik Hollensbe
1150c1639a builder: ONBUILD triggers were not accurately being executed in JSON cases.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-10-14 01:59:45 +00:00
Jessica Frazelle
de32f48e66 Fix Tag Test for longer tags
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-10-07 19:37:08 -07:00
Michael Crosby
50fa9dffcf Allow child to overwrite entrypoint from parent
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-10-07 23:45:35 +00:00
Jessie Frazelle
12203e475d Merge pull request #8434 from tiborvass/ignore_invalid_Dockerfile_instructions
Ignore unknown dockerfile instructions
2014-10-07 14:45:51 -07:00
Sven Dowideit
40cad37f0a Merge pull request #8341 from unclejack/add_workdir_test
add test for workdir env vars and add docs
2014-10-07 14:27:32 +10:00
Tibor Vass
9fe1dd3103 Add test for ignoring invalid dockerfile instructions
Signed-off-by: Tibor Vass <teabee89@gmail.com>
2014-10-06 23:14:25 -04:00
Alexandr Morozov
a650ab7f29 Merge pull request #8409 from unclejack/integcli_lint
integcli: lint fixes
2014-10-06 14:32:08 -07:00
unclejack
c0e632246d integcli: lint fixes
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-10-06 23:15:17 +03:00
Alexandr Morozov
21dff8cbec Fix TestBuildCacheADD to check cache in out, not in id
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-10-06 10:04:10 -07:00
Adrien Folie
2c5b5cfc92 Add ENV variables support to WORKDIR build command
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Docker-DCO-1.1-Signed-off-by: Adrien Folie <folie.adrien@gmail.com> (github: folieadrien)

Conflicts:
	builder/builder.go
		This file has been deleted.
2014-10-01 17:34:36 +03:00
Rafe Colton
30d5a42c1f Move archive package into pkg/archive
Now that the archive package does not depend on any docker-specific
packages, only those in pkg and vendor, it can be safely moved into pkg.

Signed-off-by: Rafe Colton <rafael.colton@gmail.com>
2014-09-29 23:23:36 -07:00
Victor Vieux
7c1aee6291 Merge pull request #8289 from duglin/FixTestcaseFor8230
Fixes the new testcase for PR #8230
2014-09-29 15:33:51 -07:00
Doug Davis
8b3fbac15c Fixes the new testcase for PR #8230
This new version makes sure that the same context is used for the two
builds run in the test.  If you don't use the same build then about 1/2 the
time the file copied into the container will look like a different file,
probably due to timestamp differences.  But reusing the same context we
re-use the same file on disk and therefore avoid the change in timestamps,
and we use the cache on the 2nd build.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2014-09-29 13:35:09 -07:00
Tibor Vass
670c8696a2 Merge pull request #8284 from erikh/fix_cmd_again
builder: Fix CMD to inject /bin/sh -c when provided with a non-json value
2014-09-29 15:56:16 -04:00
Erik Hollensbe
9f142bf9be builder: Fix CMD to inject /bin/sh -c when provided with a non-json value.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-09-29 12:22:18 -07:00
Erik Hollensbe
1cd6135972 Merge pull request #8230 from duglin/Issue6820
add wildcard support to COPY/ADD (part 2 of issue #6820)
2014-09-29 11:19:01 -07:00
Daniel, Dao Quang Minh
8833d800bf check tag's validity before building.
When user passes an invalid tag to `docker build`
(i.e.  `docker build -t abcd:A0123456789B0123456789C0123456789 .`), check the
tag first and terminate-early so user can specify the tag again

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
2014-09-29 06:21:54 -04:00
Doug Davis
acd40d5079 add wildcard support to copy/add
Signed-off-by: Doug Davis <dug@us.ibm.com>
2014-09-25 20:44:51 -07:00
Tibor Vass
d369612b41 Merge pull request #7994 from erikh/parser_fix_volume_parsing
builder: Fix handling of VOLUME command where multiple volumes are specified in a space delimited list.
2014-09-25 12:45:48 -04:00
Erik Hollensbe
a5ca549a18 builder: Fix handling of VOLUME command where multiple volumes are
specified in a space delimited list.

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-09-25 09:44:19 -07:00
Alexandr Morozov
d302d92961 Rewrite TestContextTar tests to not use fixtures
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-24 17:09:18 +04:00
Alexandr Morozov
51a56399f6 Rewrite TestBuildWithInaccessibleFilesInContext to not use fixtures
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-24 17:09:14 +04:00
Alexandr Morozov
52cf331206 Rewrite TestBuildRm to not use fixtures
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-24 13:15:55 +04:00