Commit graph

633 commits

Author SHA1 Message Date
John Howard
ceed93a874 Windows: TestBuildWorkdirWindowsPath hard code fix
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-07-20 21:23:38 -07:00
Sebastiaan van Stijn
db435560b3 Merge pull request #24389 from Microsoft/jjh/silentsecurity
Windows: No security warning on quiet
2016-07-08 11:06:33 -07:00
John Howard
a9b3c1d720 Windows: No security warning on quiet
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-07-07 16:00:08 -07:00
Sebastiaan van Stijn
6167a9ab16 Merge pull request #22868 from Microsoft/jjh/dockerfilecmd
Windows: CMD not honouring arg escaping
2016-07-07 09:21:26 -07:00
Otto Kekäläinen
644a7426cc Fix spelling in comments, strings and documentation
Signed-off-by: Otto Kekäläinen <otto@seravo.fi>
2016-07-03 20:58:11 +03:00
John Howard
45da127442 Windows: Skip TestBuildEmptyCmd on RS1
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-06-28 12:22:16 -07:00
John Howard
d05d0211bc Windows: CMD not honouring arg escaping
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-06-15 16:46:32 -07:00
Vincent Demeester
7d988a7aa6 Merge pull request #23093 from tkopczynski/20784-builder-dockerfile-outside-context
Builder integration tests for Dockerfile outside context as a unit test
2016-06-14 08:44:24 +02:00
Vincent Demeester
60f447b655
Migrate docker build to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-07 18:15:44 +02:00
Vincent Demeester
df1dd1322d Merge pull request #22489 from Microsoft/jjh/shell
Builder shell configuration
2016-06-05 17:43:12 +02:00
Tomasz Kopczynski
fb175bb367 Reimplementing builder tests for Dockerfile outside context as a unit test
Signed-off-by: Tomasz Kopczynski <tomek@kopczynski.net.pl>
2016-06-05 08:39:06 +02:00
Sebastiaan van Stijn
843720257b Merge pull request #23248 from Microsoft/jjh/flakeytest
Windows: Turn off TestBuildDockerignoreComment
2016-06-04 14:07:52 +02:00
John Howard
b18ae8c9cc Builder default shell
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-06-03 13:54:31 -07:00
John Howard
d75aaa2ca0 Windows: Turn off TestBuildDockerignoreComment
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-06-03 13:23:35 -07:00
Yong Tang
ea86320fcc Skip UTF-8 BOM bytes from Dockerignore if exist
This fix tries to address issues related to #23221 where Dockerignore
may consists of UTF-8 BOM. This likely happens when Notepad
tries to save a file as UTF-8 in Windows.

This fix skips the UTF-8 BOM bytes from the beginning of the
Dockerignore if exists.

Additional tests has been added to cover the changes in this fix.

This fix is related to #23221 (UTF-8 BOM in Dockerfile).

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-06-03 07:26:36 -07:00
Yong Tang
678c80f925 Skip UTF-8 BOM bytes from Dockerfile if exists
This fix tries to address issues in #23221 where Dockerfile
may consists of UTF-8 BOM. This likely happens when Notepad
tries to save a file as UTF-8 in Windows.

This fix skips the UTF-8 BOM bytes from the beginning of the
Dockerfile if exists.

Additional tests has been added to cover the changes in this
fix.

This fix fixes #23221.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-06-03 06:16:50 -07:00
Yong Tang
8913dace34 Add support for comment in .dockerignore
This fix tries to address the issue raised in #20083 where
comment is not supported in `.dockerignore`.

This fix updated the processing of `.dockerignore` so that any
lines starting with `#` are ignored, which is similiar to the
behavior of `.gitignore`.

Related documentation has been updated.

Additional tests have been added to cover the changes.

This fix fixes #20083.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-06-02 19:06:52 -07:00
Darren Stahl
d96e36cbbf Revendor hcsshim
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-05-31 14:42:01 -07:00
Arnaud Porterie
8e924153e2 Merge pull request #22268 from Microsoft/jjh/continuationescape
Support platform semantic file paths through ESCAPE
2016-05-26 10:00:56 -07:00
Tomasz Kopczynski
cf2611f323 Reimplementing more builder integration tests as unit tests
Signed-off-by: Tomasz Kopczynski <tomek@kopczynski.net.pl>
2016-05-22 01:00:57 +02:00
John Howard
e8e3dd32c5 Support platform file paths through escape
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-05-20 20:29:59 -07:00
Sebastiaan van Stijn
9de21de453 Merge pull request #22462 from Microsoft/jjh/22181unittests
Windows: Reduce CLI time, move some to unit tests
2016-05-13 00:27:29 +02:00
Tomasz Kopczynski
18eeb39985 Reimplementing builder integration tests as unit tests
Signed-off-by: Tomasz Kopczynski <tomek@kopczynski.net.pl>
2016-05-11 22:13:39 +02:00
John Howard
faab71701f Windows: Reduce CLI time, move some to unit tests
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-05-06 12:26:08 -07:00
John Howard
6b5c83bf18 Windows: Support ARG in builder
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-05-04 14:32:23 -07:00
Sebastiaan van Stijn
bf7307558e Merge pull request #22269 from coolljt0725/skip
Skip TestBuildNotVerboseFailure if no network
2016-04-28 11:19:56 +02:00
Lei Jitang
9ab0aa4336 Skip TestBuildNotVerboseFailure if no network
TestBuildNotVerboseFailure use a non-exist image busybox1,
it requires network connection to access to Dockerhub, skip
this test if there is no network.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-04-27 21:29:05 -04:00
Michael Crosby
2b97201e0c Merge pull request #22181 from Microsoft/jjh/workdir
Windows: Consistent build workdir handling
2016-04-26 16:51:09 -07:00
John Howard
0433801093 Windows: Consistent build workdir handling
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-04-26 15:32:52 -07:00
Yong Tang
5844736c14 Labels set on the command line always override labels in Dockerfile
This fix tries to address the inconsistency in #22036 where labels
set on the command line will not override labels specified in
Dockerfile, but will override labels inherited from `FROM` images.

The fix add a LABEL with command line options at the end of the
processed Dockerfile so that command line options labels always
override the LABEL in Dockerfiles (or through `FROM`).

An integration test has been added for test cases specified in #22036.

This fix fixes #22036.

NOTE: Some changes are from #22266 (@tiborvass).

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-04-23 18:49:17 -07:00
John Howard
c2d183426b Windows: Set default directory
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-04-18 15:59:41 -07:00
David Calavera
55053d3537
Get events until a time in the past.
This change allow to filter events that happened in the past
without waiting for future events. Example:

docker events --since -1h --until -30m

Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-04-14 16:22:16 -07:00
David Calavera
1a85c8ebbe Apply build labels to images with only a FROM tag.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-03-30 17:28:13 -04:00
Tibor Vass
53d2e5e9d7 Merge pull request #21270 from ehazlett/resource-labels
Add Label support for Images (build), Networks and Volumes on Creation
2016-03-22 15:12:33 -04:00
Evan Hazlett
fc214b4408 add label support for build, networks and volumes
build: implement --label

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

network: allow adding labels on create

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

volume: allow adding labels on create

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

add tests for build, network, volume

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

vendor: libnetwork and engine-api bump

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-03-22 11:49:06 -04:00
cyli
623ccc2f31 Pull, Pull-A, and Build will only pull tags from the targets role or the targets/releases role.
It will ignore tags in all other delegation roles.

Signed-off-by: cyli <cyli@twistedmatrix.com>
2016-03-21 10:56:49 -07:00
Antonio Murdaca
1b5c2e1d72 distribution: errors: do not access the errors slice if it's empty
- cherry-pick from 1.10.3 branch: 0186f4d422
- add token service test suite
- add integration test (missing in 1.10.3 branch)

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-03-16 09:00:39 +01:00
Phil Estes
06d95003b3 Fix CopyWithTar creation of new destination dir as remapped root
If the destination does not exist, it needs to be created with ownership
mapping to the remapped uid/gid ranges if user namespaces are enabled.
This fixes ADD operations, similar to the prior fixes for COPY and WORKDIR.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2016-03-12 23:05:45 -05:00
Anil Belur
deeb5c95e2 Optimized integration test case DockerSuite.TestBuildUsersAndGroups for #19425
Removed unnecessary RUN statements and combined some of the RUN statement into a single line.

The runtime performance is seen as follows:
pre-change:
PASS: docker_cli_build_test.go:3826: DockerSuite.TestBuildUsersAndGroups
63.074s

post-change:
PASS: docker_cli_build_test.go:3826: DockerSuite.TestBuildUsersAndGroups
49.698s

Signed-off-by: Anil Belur <askb23@gmail.com>
2016-03-09 18:00:56 +05:30
Phil Estes
799a6b94ee Ensure WORKDIR is created with remapped root ownership
Correct creation of a non-existing WORKDIR during docker build to use
remapped root uid/gid on mkdir

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2016-03-08 11:58:55 -05:00
Yong Tang
c77bb28dfb Optimize slow bottleneck test of DockerSuite.TestBuildDockerignoringWildDirs.
This PR fix the DockerSuite.TestBuildDockerignoringWildDirs test
in #19425.
Instead of having multiple RUN instructions in Dockerfile for every
single directory tested, this PR tries to collapse multiple RUN
instructions into one RUN instruction in Dockerfile.
When a docker image is built, each RUN instruction in Dockerfile
will generate one layer in history. It takes considerable amount of
time to build many layers if there are many RUN instructions within
the Dockerfile. Collapsing into one RUN instruction not only speeds
up the execution significantly, it also conforms to the general
guideline of the Dockerfile reference.
Since the test (DockerSuite.TestBuildDockerignoringWildDirs) is
really about testing the docker build with ignoring wild
directories, the purpose of the test is not altered with this PR
fix.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-03-03 23:16:10 +00:00
Antonio Murdaca
44152144ca cliconfig: credentials: support getting all auths
docker build is broken because it sends to the daemon the full
cliconfig file which has only Email(s). This patch retrieves all auth
configs from the credentials store.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-03-02 17:48:56 +01:00
Aaron Lehmann
2453262e7b Merge pull request #20565 from kencochrane/remove_email_on_login
Remove email address field from login
2016-03-01 08:02:16 -08:00
Ken Cochrane
aee260d4eb Remove email address field from login
This removes the email prompt when you use docker login, and also removes the ability to register via the docker cli. Docker login, will strictly be used for logging into a registry server.

Signed-off-by: Ken Cochrane <kencochrane@gmail.com>
2016-02-29 17:53:27 -08:00
Sebastiaan van Stijn
67b16c7381 Merge pull request #20782 from estesp/new-parent-dir-ownership
Fix ownership of non-existing parent dir
2016-03-01 01:45:38 +01:00
Phil Estes
7a61b9ae42 Fix ownership of non-existing parent dir
During "COPY" or other tar unpack operations, a target/destination
parent dir might not exist and should be created with ownership of the
root in the right context (including remapped root when user namespaces
are enabled)

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2016-02-29 09:14:23 -05:00
Qiang Huang
53b0d62683 Vendor engine-api to 70d266e96080e3c3d63c55a4d8659e00ac1f7e6c
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-02-29 19:28:37 +08:00
Tibor Vass
f4a1e3db99 Support TLS remote test daemon
This will allow us to have a windows-to-linux CI, where the linux host
can be anywhere, connecting with TLS.

Signed-off-by: Tibor Vass <tibor@docker.com>
2016-02-25 14:12:17 -05:00
Darren Stahl
5fc0de2688 Sixth set of TestBuild CI Enabling for Windows
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-02-13 20:54:59 -08:00
Antonio Murdaca
5a9a435d40 Merge pull request #20290 from calavera/fix_stop_signal_merge
Inherit StopSignal from Dockerfile.
2016-02-13 09:26:11 +01:00
David Calavera
a252516ec1 Inherit StopSignal from Dockerfile.
Make sure the image configuration is not overriden by the default
value in the `create` flag.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-02-12 17:56:40 -05:00
Aaron Lehmann
6fed46aeb9 Pass authentication credentials through to build
In Docker 1.10 and earlier, "docker build" can do a build FROM a private
repository that hasn't yet been pulled. This doesn't work on master. I
bisected this to https://github.com/docker/docker/pull/19414.
AuthConfigs is deserialized from the HTTP request, but not included in
the builder options.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-02-12 10:50:16 -08:00
David Calavera
9be87be582 Merge pull request #20170 from Microsoft/10662-TestBuildCI5
Fifth set of TestBuild CI enables for Windows
2016-02-10 16:02:26 -08:00
Darren Stahl
0adcce10a1 Fifth set of TestBuild CI enables for Windows
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-02-10 12:37:58 -08:00
Darren Stahl
4603a7259e Third set of TestBuild* CI enabling for Windows
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-02-09 15:19:38 -08:00
David Calavera
d6870238e3 Merge pull request #19985 from Microsoft/CombineSetupWorkingDir
Combine SetupWorkingDirectory for Linux and Windows
2016-02-09 15:18:49 -08:00
Darren Stahl
eed648ac5a Fourth set of enabling Builder CI tests for Windows
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-02-05 17:46:06 -08:00
Darren Stahl
6791230320 Combine SetupWorkingDirectory for Linux and Windows
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-02-05 10:27:10 -08:00
Darren Stahl
96c5221626 Move base image selection to a utility function
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-02-04 15:06:34 -08:00
Sebastiaan van Stijn
c2d6831fc4 Merge pull request #19695 from Microsoft/10662-TestBuildCI2
Second set of enabling TestBuild CI for Windows
2016-02-01 16:29:52 +01:00
David Calavera
35ef3efe9a Merge pull request #19805 from WeiZhang555/test-inspect
Make test code consistent
2016-01-29 12:43:58 -08:00
Zhang Wei
62a856e912 Assert error in body of function inspectField*
1. Replace raw `docker inspect -f xxx` with `inspectField`, to make code
cleaner and more consistent
2. assert the error in function `inspectField*` so we don't need to
assert the return value of it every time, this will make inspect easier.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-01-29 23:39:07 +08:00
Darren Stahl
2b95f012db Second set of enabling TestBuild CI for Windows
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-01-28 13:43:22 -08:00
Darren Stahl
563a4d1b9f First batch of Windows-Windows TestBuild CI enabling
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-01-26 12:15:13 -08:00
Aaron Lehmann
74fafa5dd2 Slight TestBuildEnvUsage2 speedup
TestBuildEnvUsage2 was flagged in https://github.com/docker/docker/issues/19425
as one of the slowest integration tests. It's slow because it has some
comprehensive builder test cases that end up creating a lot of layers.
Even with a busybox base image, this can be expensive. It's not possible
to build "FROM scratch" because the test cases need the shell to ensure
environment variables are set correctly.

Some of the ENV and RUN statements can be combined. This causes fewer
layers to get created. Doing this produces a marginal improvement in the
runtime.

Before:

    PASS: docker_cli_build_test.go:3956: DockerSuite.TestBuildEnvUsage2 43.619s

After:

    PASS: docker_cli_build_test.go:3956: DockerSuite.TestBuildEnvUsage2 31.286s

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-01-22 17:13:50 -08:00
Antonio Murdaca
167cc42986 api: client: build: do not fall through if git isn't installed
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-01-19 16:50:14 +01:00
John Howard
d3392a3bde Windows: Fix test regression from 19155
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-01-14 12:00:27 -08:00
David Calavera
a225e39667 Merge pull request #19155 from coolljt0725/create_cwd_on_create
Create the working directory on container creation
2016-01-14 09:13:44 -08:00
Alexander Morozov
807d575b5e Merge pull request #19135 from Microsoft/jjh/securitywarning
Windows: Fix security warning regression
2016-01-08 13:55:41 -08:00
Riyaz Faizullabhoy
1c32a66877 update tests and error messages, revendor notary with tag
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-01-08 09:11:33 -08:00
Lei Jitang
cde0ed67a1 Create the working directory on container creation
if create a container with -w to specify the working directory and
the directory does not exist in the container rootfs, the directory
will be created until the container start. It make docker export of
a created container and a running container inconsistent.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-01-08 12:11:21 +08:00
Riyaz Faizullabhoy
1c125f50cf Notary delegation integration into docker
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-01-07 19:35:45 -08:00
John Howard
ebf4c91717 Windows: Fix security warning regression
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-01-06 15:54:43 -08:00
Doug Davis
d3ea7e80e8 Add default PATH to 'scratch' images
Closes #19012

Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-01-06 09:50:35 -08:00
David Calavera
851fe00c64 Add filter by event type and documentation.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-04 14:58:04 -05:00
David Calavera
72f1881df1 Add event types.
- Stop serializing JSONMessage in favor of events.Message.
- Keep backwards compatibility with JSONMessage for container events.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-30 17:39:33 -05:00
David Calavera
9aad7d209f Move test out of the windows build.
Because it can still run on windows server and fail because it doesn't
have `chown`.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-30 16:36:48 -05:00
David Calavera
56f8b051eb Merge pull request #18158 from mauri/add_owner
ADD files to a folder doesn't set correct UID and GID
2015-12-30 11:19:15 -08:00
Mauricio Garavaglia
b638bc6f17 Fix files ownership when ADD is used
Signed-off-by: Mauricio Garavaglia <mauriciogaravaglia@gmail.com>
2015-12-30 11:35:19 -03:00
David Calavera
af51df20bd Extract event processing to a common function for testing.
We keep only one logic to test event related behavior that will help us
diagnose flacky event errors.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-22 17:10:06 -05:00
Boaz Shuster
60b4db7eb1 Change the quiet flag behavior in the build command
Right now, the quiet (-q, --quiet) flag ignores the output
generated from within the container.

However, it ought to be quiet in a way that all kind
of diagnostic output should be ignored, unless the build
process fails.

This patch makes the quiet flag behave in the following way:
 1. If the build process succeeds, stdout contains the image ID
    and stderr is empty.
 2. If the build process fails, stdout is empty and stderr
    has the error message and the diagnostic output of that process.

If the quiet flag is not set, then everything goes to stdout
and error messages, if there are any, go to stderr.

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
2015-12-21 16:38:50 +02:00
Tonis Tiigi
15d84a3a48 Improve reference parse errors
Fixes #18093

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-12-16 11:58:53 -08:00
Justas Brazauskas
927b334ebf Fix typos found across repository
Signed-off-by: Justas Brazauskas <brazauskasjustas@gmail.com>
2015-12-13 18:04:12 +02:00
David Calavera
a3056f9f72 Log events stream when TestEventStreaming fails.
Let the tag event some more time to be emitted.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-11 17:20:40 -05:00
Tibor Vass
1f8efc687c Merge pull request #18123 from aidanhs/aphs-fail-on-broken-tar
Ensure adding a broken tar doesn't silently fail
2015-12-07 14:38:21 +01:00
David Calavera
434d2e8745 Add PubSub topics.
A TopicFunc is an interface to let the pubisher decide whether it needs
to send a message to a subscriber or not. It returns true if the
publisher must send the message and false otherwise.

Users of the pubsub package can create a subscriber with a topic
function by calling `pubsub.SubscribeTopic`.

Message delivery has also been modified to use concurrent channels per
subscriber. That way, topic verification and message delivery is not
o(N+M) anymore, based on the number of subscribers and topic verification
complexity.

Using pubsub topics, the API stops controlling the message delivery,
delegating that function to a topic generated with the filtering
provided by the user. The publisher sends every message to the
subscriber if there is no filter, but the api doesn't have to select
messages to return anymore.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-02 16:43:49 -05:00
Tonis Tiigi
4352da7803 Update daemon and docker core to use new content addressable storage
Add distribution package for managing pulls and pushes. This is based on
the old code in the graph package, with major changes to work with the
new image/layer model.

Add v1 migration code.

Update registry, api/*, and daemon packages to use the reference
package's types where applicable.

Update daemon package to use image/layer/tag stores instead of the graph
package

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-11-24 09:40:25 -08:00
Aidan Hobson Sayers
3243e504d0 Ensure adding a broken tar doesn't silently fail
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
2015-11-23 14:18:58 +00:00
Stefan Scherer
88c1bc10c4 Increase timeouts to fix test on ARM
Signed-off-by: Stefan Scherer <scherer_stefan@icloud.com>
2015-11-20 23:12:12 +01:00
Alexander Morozov
f5e318a17b Merge pull request #17090 from duglin/dockerignoreWildcards
Support multi-dir wildcards in .dockerignore
2015-11-13 14:29:34 -08:00
Doug Davis
eddb14a44e Support multi-dir wildcards in .dockerignore
Closes #13113

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-11-13 13:44:07 -08:00
Tonis Tiigi
86faf1e165 Add test for builder cache with root source path
Fixes #17827

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-11-10 10:15:09 -08:00
David Calavera
014bab03ef Merge pull request #17789 from duglin/Issue17781
Allow for env vars to have spaces in some cases
2015-11-10 08:55:11 -08:00
Doug Davis
6990f8c616 Allow for env vars to have spaces in some cases
Closes #17781

This allows for env vars in EXPOSE to be parsed for spaces so that each
"word" is then treated independently instead of as a single word/arg.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-11-09 12:42:56 -08:00
Brian Goff
bf5a6d2a83 Merge pull request #17710 from tonistiigi/fix-builder-symlinks
Fix symlink handling in builder ADD/COPY commands
2015-11-07 16:32:07 -05:00
Tonis Tiigi
47da59f7ec Fix symlink handling in builder ADD/COPY commands
Fixes #17290

Fixes following issues:

- Cache checksums turning off while walking a broken symlink.

- Cache checksums were taken from symlinks while targets were actually copied.

- Copying a symlink pointing to a file to a directory used the basename of the target as a destination basename, instead of basename of the symlink.


Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-11-06 10:58:12 -08:00
David Calavera
157b66ad39 Remove exec-driver global daemon option.
Each platform has only a driver now.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-11-05 17:09:58 -05:00
Sebastiaan van Stijn
448398c2a8 Merge pull request #15780 from mountkin/build-multi-tags
Add ability to add multiple tags with docker build
2015-10-23 13:50:35 -07:00
Shijiang Wei
c2eb37f9ae Add ability to add multiple tags with docker build
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
2015-10-24 00:59:56 +08:00
Antonio Murdaca
04ef69a1e9 integration-cli: docker_cli_build_test: check error before defer
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-10-21 17:13:45 +02:00
Shijiang Wei
2968fa44eb emit a "tag" event when building image with "-t" parameter
This is useful for cluster systems such as swarm to sync the image
state when new images are successfully built.

Signed-off-by: Shijiang Wei <mountkin@gmail.com>
2015-10-19 20:09:14 +08:00
Jessica Frazelle
ea3afdad61 add test-integration-cli specifics for userns
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-10-09 20:50:27 -04:00
Phil Estes
442b45628e Add user namespace (mapping) support to the Docker engine
Adds support for the daemon to handle user namespace maps as a
per-daemon setting.

Support for handling uid/gid mapping is added to the builder,
archive/unarchive packages and functions, all graphdrivers (except
Windows), and the test suite is updated to handle user namespace daemon
rootgraph changes.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-10-09 17:47:37 -04:00
Tibor Vass
f41230b93a Move builder files to builder/dockerfile
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-10-05 18:26:47 -04:00
Brian Goff
8e5bb8fdd3 Do not parse config.Volumes for named volumes
Fixes an issue where `VOLUME some_name:/foo` would be parsed as a named
volume, allowing access from the builder to any volume on the host.

This makes sure that named volumes must always be passed in as a bind.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-09-29 10:01:57 -04:00
John Howard
b69c13b1a6 Windows: Nice error on ARG (builder)
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-09-21 14:54:15 -07:00
Antonio Murdaca
b616b8a17a integration-cli: check err on tmp dir creation
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-09-21 00:00:55 +02:00
Madhav Puri
54240f8da9 Support for passing build-time variables in build context
- The build-time variables are passed as environment-context for command(s)
run as part of the RUN primitve. These variables are not persisted in environment of
intermediate and final images when passed as context for RUN. The build environment
is prepended to the intermediate continer's command string for aiding cache lookups.
It also helps with build traceability. But this also makes the feature less secure from
point of view of passing build time secrets.

- The build-time variables also get used to expand the symbols used in certain
Dockerfile primitves like ADD, COPY, USER etc, without an explicit prior definiton using a
ENV primitive. These variables get persisted in the intermediate and final images
whenever they are expanded.

- The build-time variables are only expanded or passed to the RUN primtive if they
are defined in Dockerfile using the ARG primitive or belong to list of built-in variables.
HTTP_PROXY, HTTPS_PROXY, http_proxy, https_proxy, FTP_PROXY and NO_PROXY are built-in
variables that needn't be explicitly defined in Dockerfile to use this feature.

Signed-off-by: Madhav Puri <madhav.puri@gmail.com>
2015-09-16 03:31:15 -07:00
John Howard
6167c7bfb8 Windows: Turn off TestBuildStopSignal
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-09-15 11:56:54 -07:00
David Calavera
3781cde61f Add STOPSIGNAL instruction to dockerfiles.
This way, images creators can set the exit signal their programs use.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-09-10 19:56:05 -04:00
John Howard
f9a3558a9d Windows: Get Integration CLI running
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-09-04 12:32:40 -07:00
Alexander Morozov
0009852cb0 Merge pull request #15877 from Microsoft/10662-trigger
Fix trigger count and output
2015-09-03 20:04:05 -07:00
John Howard
6620102926 Fix trigger count and output
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-09-03 17:39:19 -07:00
Doug Davis
51e721ab07 Add missing defer to delete temp dir
Minor thing I just noticed

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-09-01 07:19:38 -07:00
John Howard
17d6c6c7e5 Builder counts from 1
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-08-26 10:05:04 -07:00
Soshi Katsuta
a41f431d11 integration-cli: use c.Assert(err, check.IsNil) instead of if err != nil
Signed-off-by: Soshi Katsuta <katsuta_soshi@cyberagent.co.jp>
2015-08-19 15:23:11 +09:00
Soshi Katsuta
d45fcc6c80 integration-cli: add a integration test to avoid parsing null string in ADD, COPY and VOLUME to nil slice
Signed-off-by: Soshi Katsuta <katsuta_soshi@cyberagent.co.jp>
2015-08-19 11:11:46 +09:00
Veres Lajos
5146232723 typofix - https://github.com/vlajos/misspell_fixer
Signed-off-by: Veres Lajos <vlajos@gmail.com>
2015-08-07 23:25:49 +01:00
Arnaud Porterie
b71cf69380 Merge pull request #15132 from LK4D4/improve_test
Fix message and add additional check to test
2015-07-29 17:36:11 -07:00
Alexander Morozov
0d09439ace Fix message and add additional check to TestBuildContainerWithCgroupParent
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-07-29 11:46:33 -07:00
Josh Hawn
bb2e6c72d2 [api/client] Tag resolved digest from Dockerfile
Builds where the base images have been resolved to trusted digest
references will now be tagged with the original tag reference from
the Dockerfile on a successful build.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2015-07-28 17:54:48 -07:00
Michael Crosby
bdc55be9b4 Merge pull request #15039 from jlhawn/fix_build_context_is_symlink
[api/client] Fix build when context dir is symlink
2015-07-27 15:11:36 -07:00
Josh Hawn
01d570ad30 [api/client] Fix build when context dir is symlink
Symbolic links in the context directory path are now evaluated.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2015-07-27 12:01:13 -07:00
Brian Goff
693ba98cb9 Don't pass check.C to dockerCmdWithError
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-07-27 14:33:32 -04:00
Doug Davis
d883540440 Adda test for using -f w/git repo on build
https://github.com/docker/docker/pull/14546 actually fixed issue #14837
but I don't see a new test to ensure we don't regress. So this PR adds
a test and then we can close #14837.

Closes #14837

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-07-27 07:49:42 -07:00
Derek McGowan
871d2b96ed Add build integration cli tests
Clean up tests to remove duplicate code

Add tests which run pull and create in an isolated configuration directory.
Add build test for untrusted tag

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-07-24 16:31:12 -07:00
Shishir Mahajan
e7fc632147 Add and modify tests for legacy and new daemon invokations
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-07-23 20:31:43 -04:00
Ben Firshman
6b3c928140 Fix golint warnings for integration-cli
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2015-07-22 14:03:50 +01:00
Vincent Demeester
5c295460da Use dockerCmd when possible (#14603)
- integration-cli/docker_cli_attach_test.go
- integration-cli/docker_cli_attach_unix_test.go
- integration-cli/docker_cli_build_test.go
- integration-cli/docker_cli_build_unix_test.go
- integration-cli/docker_cli_by_digest_test.go
- integration-cli/docker_cli_commit_test.go
- integration-cli/docker_cli_config_test.go
- integration-cli/docker_cli_cp_test.go
- integration-cli/docker_cli_create_test.go
- integration-cli/docker_cli_pause_test.go
- integration-cli/docker_cli_port_test.go
- integration-cli/docker_cli_port_unix_test.go
- integration-cli/docker_cli_proxy_test.go
- integration-cli/docker_cli_ps_test.go
- integration-cli/docker_cli_pull_test.go
- integration-cli/docker_cli_push_test.go

- docker_api_attach_test.go
- docker_api_containers_test.go
- docker_api_events_test.go
- docker_api_exec_resize_test.go
- docker_api_exec_test.go
- docker_api_images_test.go
- docker_api_info_test.go

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-07-14 21:52:43 +02:00
Antonio Murdaca
d3566fa0b1 Cleanup not needed calls to deleteImages
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-07-13 20:30:53 +02:00
Moysés Borges
d48bface59 Support downloading remote tarball contexts in builder jobs.
Signed-off-by: Moysés Borges <moysesb@gmail.com>
2015-06-19 16:35:00 -03:00
Josh Hawn
0e10507a1c [builder] Make build cache ignore mtime
Build cache uses pgk/tarsum to get a digest of content which is
ADD'd or COPY'd during a build. The builder has always used v0 of
the tarsum algorithm which includes mtimes however since the whole
file is hashed anyway, the mtime doesn't really provide any extra
information about whether the file has changed and many version
control tools like Git strip mtime from files when they are cloned.

This patch updates the build subsystem to use v1 of Tarsum which
explicitly ignores mtime when calculating a digest. Now ADD and
COPY will result in a cache hit if only the mtime and not the file
contents have changed.

NOTE: Tarsum is NOT a meant to be a cryptographically secure hash
function. It is a best-effort approach to determining if two sets of
filesystem content are different.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2015-06-08 13:54:47 -07:00
Jessie Frazelle
aa8d8fdc0c Merge pull request #13611 from duglin/Issue13417a
Allow .dockerignore to ignore everything
2015-06-01 15:59:57 -07:00
Doug Davis
82ea6ed2bc Allow .dockerignore to ignore everything
Change CLI error msg because it was too specific and didn't make sense
when there were errors not related to inaccessible files.

Removed some log.Error() calls since they're not really errors we should
log. Returning the error will be enough.

Closes: #13417

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-05-30 04:16:00 -07:00
Antonio Murdaca
15134a3320 Remove PortSpecs from Config
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-05-29 22:38:09 +02:00
David Calavera
a914101296 Do not require cgroups capabilities on windows to run the integration tests.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-05-29 11:42:40 -07:00
Qiang Huang
34e5b6af19 Skip test if not have Cpu quota or Cpu period
Closes: #13522

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-05-28 14:59:58 +08:00
Zhang Wei
ab121345ee Cleanup: change test func name
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2015-05-25 14:51:10 +08:00
Doug Davis
0024935f64 Use stderr instead of logrus for CLI error messages
Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-05-12 17:22:41 -07:00
Doug Davis
006c066b6c Fix RUN err msg (again)
Previous fix used %q which incorrectly go-escaped things. For example:

```
RUN echoo A \& B	C
```
would result in the user seeing:
```
INFO[0000] The command '/bin/sh -c echoo A \\& B\tC' returned a non-zero code: 127
```
Note the double-\ and the \t instead of a tab character

The testcase had to double escape things due to logrus getting in the way
but I'm going to fix that in another PR because its a change to the UX.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-05-09 09:22:30 -07:00
Jessie Frazelle
d0bc0153c6 Merge pull request #12278 from duglin/12267-Wildcards
Fix for Daemon crashing when wildcards are used for COPY/ADD
2015-05-07 17:01:16 -07:00
Doug Davis
54662eae10 Fix RUN's error msg when it fails
When RUN returns with a non-zero return code it prints the command
that was executed as a Go []string:
```
INFO[0000] The command &{[/bin/sh -c noop a1 a2]} returned a non-zero code: 127
```

instead it should look like this:
```
INFO[0000] The command "/bin/sh -c noop a1 a2" returned a non-zero code: 127
```

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-05-05 16:08:41 -07:00
Doug Davis
08b7f30fcd Fix issue where build steps are duplicated in the output
This fixes an issue where the build output for the "Steps" would look like:
```
Step 1: RUN echo hi echo hi
```
instead of
```
Step 1: RUN echo hi
```

Also, I noticed that there were no checks to make sure invalid Dockerfile
cmd flags were caught on cmds that didn't use cmd flags at all. They would
have been caught on the cmds that had flags, but cmds that didn't bother
to add a new code for flags would have just ignored them.  So, I added
checks to each cmd to flag it.

Added testcases for issues.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-05-05 15:28:42 -07:00
Arnaud Porterie
e960e4bb12 Merge pull request #11844 from jbarbier/cgroup-parent-42
Adding cgroup-parent option for docker build
2015-05-05 14:46:47 -07:00
David Calavera
0a2ccb1cb5 Merge pull request #12769 from calavera/git_build_fragment
Use git url fragment to specify build reference and dir context.
2015-05-04 12:48:24 -07:00
David Calavera
49fd83a25e Use git url fragment to specify reference and dir context.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-05-04 09:28:06 -07:00
Antonio Murdaca
4203230cbb c.Fatal won't fail and exit test inside a goroutine, errors should be handled outside with a channel
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-29 17:02:22 +02:00
buddhamagnet
6fd8e485c8 add support for exclusion rules in dockerignore
Signed-off-by: Dave Goodchild <buddhamagnet@gmail.com>
2015-04-28 18:56:45 +01:00
Doug Davis
82daa43844 Fix for Daemon crashing when wildcards are used for COPY/ADD
in the filename and the command itself

Closes #12267

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-04-27 19:09:57 -07:00
David Mackey
3941623fbc trivial: typo cleanup
Signed-off-by: David Mackey <tdmackey@booleanhaiku.com>
2015-04-27 13:35:08 -07:00
Nathan LeClaire
9dbe12b792 Migrate integration test to new method
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-04-25 17:12:01 -04:00
Nathan LeClaire
65aba0c9d6 Add dep to test
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-04-25 15:25:52 -04:00
Nathan LeClaire
f039c699a4 Fix gofmt
Mischevious comma is mischevious

Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-04-25 15:25:52 -04:00
Marianna
f40dd69c97 Add test for cgroup parent flag for build
Signed-off-by: Marianna <mtesselh@gmail.com>
2015-04-25 15:25:52 -04:00
Alexander Morozov
a9688cdca5 Implement teardown removeAllImages
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-04-24 10:37:21 -07:00
Lei Jitang
5f4fb8be00 Add cpu cfs quota to build
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-04-24 08:54:08 +08:00
Alexander Morozov
799cf056e7 Merge pull request #11839 from brahmaroutu/template_11641
Allow go template to work properly with inspect …
2015-04-23 13:07:40 -07:00
Srini Brahmaroutu
231d362db7 Allow go template to work properly with inspect
Closes #11641

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-04-23 18:25:18 +00:00
Antonio Murdaca
ee7a7b07e7 Remove deleteAllContainers call in test
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-23 16:32:50 +02:00
Qiang Huang
b0ef3194aa fix inspect format result
Currently `docker inspect -f` use json.Unmarshal() unmarshal
to interface, it will store all JSON numbers in float64, so
we use `docker inspect 4f0d73b75a0d | grep Memory` and
`docker inspect -f {{.HostConfig.Memory}} 4f0d73b75a0d` will
get different values.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-04-23 09:28:07 +08:00
Brian Goff
f3680e7494 Cleanup daemon/volumes
- Mount struct now called volumeMount
- Merged volume creation for each volume type (volumes-from, binds, normal
  volumes) so this only happens in once place
- Simplified container copy of volumes (for when `docker cp` is a
  volume)

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-04-22 19:32:10 -04:00
Alexander Morozov
dc944ea7e4 Use suite for integration-cli
It prints test name and duration for each test.
Also performs deleteAllContainers after each test.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-04-21 10:28:52 -07:00
bobby abbott
621b601b3c Removed unnecessary error output from dockerCmd
Changed method declaration. Fixed all calls to dockerCmd
method to reflect the change.

resolves #12355

Signed-off-by: bobby abbott <ttobbaybbob@gmail.com>
2015-04-17 09:11:14 -07:00
Qiang Huang
f8dc7e8754 Add cpuset-mems support for docker build
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-04-15 09:34:12 +08:00
Qiang Huang
c49cc1f2fb fix build test by adding --no-cache
Testcase TestBuildResourceConstraintsAreUsed run build without
--no-cache, so if you run this test twice, it will fail the
second time.
TESTFLAGS='-v -run ^TestBuildResourceConstraintsAreUsed$' ./hack/make.sh binary test-integration-cli
[PASSED]
TESTFLAGS='-v -run ^TestBuildResourceConstraintsAreUsed$' ./hack/make.sh binary test-integration-cli
[FAIL]
Because we'll use cID to inspect field and will get empty cID
if we have cache.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-04-13 16:24:49 +08:00
Antonio Murdaca
d38c90140b Fix TestBuildCancelationKillsSleep to not fail on Windows
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-09 21:03:19 +02:00
Liu Hua
645c020f5a fix up Image-name related issues in docker ps and CI
This patch include the following fixs:
 - fix image name error when docker ps
 - fix docker events test failure: use the exact image name for filter
 - fix docker build CI test failure due to "docker events" change

Because of change of daemon log behavior. Now we record
the exact Image name as you typed. So docker run -d busybux sh
and docker run -d busybox:latest are not the same in the log.
So it will affect the docker events. So change the related CI

Signed-off-by: Liu Hua <sdu.liu@huawei.com>
2015-04-09 23:03:23 +08:00
Arnaud Porterie
b9d2ede4d4 Merge pull request #12107 from cpuguy83/remove_striptrailingchars
Remove `stripTrailingCharacters` from tests
2015-04-06 08:46:08 -07:00
Brian Goff
475c65319b Remove stripTrailingCharacters from tests
This was just an alias to `strings.TrimSpace`

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-04-06 09:21:18 -04:00
Doug Davis
39908fc6d9 Add support for more advanced ${xxx:...} syntax
Just ${xxx:+...} and ${xxx:-...} for now

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-04-01 08:11:15 -07:00
Doug Davis
9a9d23dbc4 Clean up integration-cli tests
My AR couldn't take it any more:
- one logDone per test
- PASSED lines don't wrap

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-03-26 17:25:50 -07:00
Doug Davis
389d0ae453 Fix TestBuildResourceConstraintsAreUsed Cpuset test
Set cpuset to "0" so that it works on single core machines.
W/o this (and set to "1") we'll see something like this error
when running:
System error: write /cgroup/cpuset/docker/66689499bbd08cd8dccc9b7bfd1d6b34e85d73ce8c84d3c69b5e91944322da60/docker/79d7c548b58c85c4cfad6cd01eb7c3b30db254d1014c496137edd93ddc528a6f/cpuset.cpus: invalid argument"

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-03-26 07:31:39 -07:00
Tibor Vass
0252ad0adc Revert "Dealing with trailing whitespaces"
The validation script from #10681 is too pedantic, and does not handle
well situations like:

```
cat <<EOF   # or <<-EOF
	Whether the leading whitespace is stripped out or not by bash
	it should still be considered as valid.
EOF
```

This reverts commit 4e65c1c319.

Signed-off-by: Tibor Vass <tibor@docker.com>
2015-03-25 10:04:56 -06:00
Alexander Morozov
f08e9f44a9 Merge pull request #11737 from duglin/FixTestOutput
TestBuildCancelationKillsSleep sends exec cmd to stdout
2015-03-25 08:45:09 -07:00
Jessica Frazelle
c959d26d2f fix 2 integration tests on lxc
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2015-03-24 21:12:16 -07:00
Doug Davis
fbd47969a8 TestBuildCancelationKillsSleep send exec cmd to stdout
and makes the testing output ugly.

This hides the output since it not used.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-03-24 20:56:26 -07:00
Antonio Murdaca
b80fae7356 Refactor pkg/common, Fixes #11599
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-24 18:19:59 +01:00
Arnaud Porterie
bfc748221b Cleanup "hello-world" image in build tests
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-03-23 15:16:13 -07:00
Antonio Murdaca
8b02d85e17 Remove hardcoded error
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-23 20:58:16 +01:00
Tibor Vass
61966d281b Merge pull request #10431 from duglin/Issue10391
Clarify ENV non-recursivenes w.r.t. env var substitution + fix escaping
2015-03-23 13:30:11 -05:00
Arnaud Porterie
ded0ada9b4 Merge pull request #11538 from duglin/EmptyVolume
Check volume path to make sure its not the empty string
2015-03-22 19:25:50 -07:00
Jessie Frazelle
45ee402a63 Merge pull request #9774 from pwaller/cancellation
Add basic build cancellation
2015-03-22 19:16:23 -07:00
Peter Waller
671c12204c Implement build cancellation
Add the capability to cancel the build by disconnecting the client.

This adds a `cancelled` channel which is used to signal that a build
should halt. The build is halted by sending a Kill signal and noticing
that the cancellation channel is closed.

This first pass implementation does not allow cancellation during a
pull, but that will come in a subsequent PR.

* Add documentation of cancellation to cli and API

* Protect job cancellation with sync.Once

* Add TestBuildCancelationKillsSleep

* Add test case for build cancellation of RUN statements.

Signed-off-by: Peter Waller <p@pwaller.net>
2015-03-22 11:31:28 +00:00
Ahmet Alp Balkan
28a34dfffd integ-cli: fix bug and race in TestBuildSpaces
`TestBuildSpaces` is used to do string manipulation to redact timestamps
from compared cmd output. However it was assuming there is going to be
only one `time=".."` in the output --not the case on windows. Therefore
I wrote a regexp to redact all log timestamps.

Also the test used to have a copy/paste bug (see err1/err2). This fixes
that, too.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-03-21 19:43:14 +00:00
Doug Davis
8071bf3967 Check volume path to make sure its not the empty string
With this Dockerfile
```
FROM ubuntu
ENV ABC=""
VOLUME $ABC
```

It builds ok but then at run time I get this error:

FATA[0002] Error response from daemon: Cannot start container 8902b4a7aaf5c4e4b11a38070d392db465fa97ad88c91c8b38dda5ab8149ccac: [8] System error: no such file or directory

Because the Volume config shows "" as the path.  This PR checks for "" as
the path and stops it at build time.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-03-20 21:39:49 -07:00
Doug Davis
6d66e3e7a5 Fix some escaping around env var processing
Clarify in the docs that ENV is not recursive

Closes #10391

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-03-20 20:09:00 -07:00
Doug Davis
c536e5bfb4 Merge pull request #11397 from ahmetalpbalkan/win-cli/build-warning
Add cli build warning about chmod bits on windows
2015-03-20 19:19:38 -04:00
Ahmet Alp Balkan
4a8b3cad60 Add cli build warning about chmod bits on windows
This shows a warning message about adjusted file/directory permission bits
when the `docker build` cli command is executed on windows.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-03-20 20:13:32 +00:00
Doug Davis
b4beb0637a Add LABEL config check to runconfig compare
Without this we won't do a proper cacche check because we skip the
labels part of the config.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-03-20 05:55:48 -07:00
Doug Davis
97c573bf02 Add a LABEL cache check testcase
Thanks to @tiborvass's review of another PR it was noticed that
we didn't have a testcase to make sure the cache checking for LABEL
was being done properly.  This adds a test for it.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-03-19 19:18:00 -07:00
Brian Goff
e6ae89a45a Allow setting resource constrains for build
Closes #10191

Allow `docker build` to set --cpu-shares, --cpuset, --memory,
--memory-swap for all containers created by the build.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-03-18 20:57:13 -04:00
Arnaud Porterie
b6ac111abf Merge pull request #9882 from ibuildthecloud/labels
Proposal: One Meta Data to Rule Them All => Labels
2015-03-16 20:20:05 -07:00
Tibor Vass
085054db9d Merge pull request #10591 from duglin/ErrUnknownCmd
Generate an error on unknown Dockerfile instruction
2015-03-16 17:47:28 -04:00
Derek McGowan
636037c363 Fix test pull verified
Update pull code to consider any layer download or new tag as an update.
Update hello-world frozen image to be explicitly tagged as frozen, to not interfere with pull tests.  The hello-world is used by pull tests because of its small size and there is no other official image with such a size.

fixes #11383

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-03-16 12:22:00 -07:00
Doug Davis
8a5b50d65d Generate an error on unknown Dockerfile instruction
Instead of just printing a warning and going on, this will generate
an error and stop processing.

This used to be part of #10561 but I decided it might need its own
independent discussion/PR as to not derail #10561.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-03-13 16:08:34 -07:00
Dan Walsh
cdfdfbfb62 Allow specification of Label Name/Value pairs in image json content
Save "LABEL" field in Dockerfile into image content.

This will allow a user to save user data into an image, which
can later be retrieved using:

docker inspect IMAGEID

I have copied this from the "Comment" handling in docker images.

We want to be able to add Name/Value data to an image to describe the image,
and then be able to use other tools to look at this data, to be able to do
security checks based on this data.

We are thinking about adding version names,
Perhaps listing the content of the dockerfile.
Descriptions of where the code came from etc.

This LABEL field should also be allowed to be specified in the
docker import --change LABEL:Name=Value
docker commit --change LABEL:Name=Value

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2015-03-13 09:47:09 -07:00
Tibor Vass
565cff84b1 Merge pull request #11265 from duglin/ScratchSHfix
Fix builder when num of RUN args is 1
2015-03-12 09:30:56 -05:00
Jessie Frazelle
52f6da2238 Merge pull request #11278 from ahmetalpbalkan/win-cli/fakeGIT
integ-cli: use httpserver container for fakeGIT
2015-03-11 18:19:11 -07:00
Jessica Frazelle
89e2e5fc55 Update logrus to 0.6.6
Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <hugs@docker.com> (github: jfrazelle)

Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <princess@docker.com> (github: jfrazelle)

Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <jess@docker.com> (github: jfrazelle)
2015-03-11 11:29:13 -07:00
Doug Davis
645f8a32df Fix builder when num of RUN args is 1
FROM scratch
ADD echo /
RUN [ "echo" ]

will die with
  exec: "/bin/sh": stat /bin/sh: no such file or directory

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-03-11 07:30:44 -07:00
Ahmet Alp Balkan
44ffb199d0 integ-cli: use httpserver container for fakeGIT
This change enables `fakeGIT()` to use the new `fakeStorage`
server which is automatically starting a container on the remote test
daemon machine using the git repo directory (when requested).

Fixes the following tests:

- `TestBuildApiLowerDockerfile`
- `TestBuildApiBuildGitWithF`
- `TestBuildApiDoubleDockerfile` (skipped on windows: NTFS case-insensitive)
- `TestBuildFromGIT` (still needs local server)

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-03-10 22:48:35 -07:00
Doug Davis
40c8e78757 Use server.URL() instead of server.URL
Old way now returns the go type instead of the value

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-03-09 17:00:45 -07:00
Tibor Vass
feb02a2bbf Merge pull request #11159 from duglin/LastModifiedTest
Add an HTTP Last-Modified header testcase
2015-03-09 19:22:27 -04:00
Alexander Morozov
7c4951d552 Merge pull request #10893 from ahmetalpbalkan/win-cli/BuildViaDockerfileURL-same-host-fix
integ-cli: Implement remote FakeStorage server for build via URL tests
2015-03-09 13:33:40 -07:00
Ahmet Alp Balkan
2e95bb5f1a integ-cli: Implement remote FakeStorage server for build via URL tests
Implemented a FakeStorage alternative that supports spinning
up a remote container on DOCKER_TEST_HOST to serve files over
an offline-compiled Go static web server image so that tests which
use URLs in Dockerfile can build them over at the daemon side.

`fakeStorage` function now automatically chooses if it should
use a local httptest.Server or a remote container.

This fixes the following tests when running against a remote
daemon:

- `TestBuildCacheADD`
- `TestBuildCopyWildcardNoFind`
- `TestBuildCopyWildcardCache`
- `TestBuildADDRemoteFileWithCache`
- `TestBuildADDRemoteFileWithoutCache`
- `TestBuildADDRemoteFileMTime`
- `TestBuildADDLocalAndRemoteFilesWithCache`
- `TestBuildADDLocalAndRemoteFilesWithoutCache`
- `TestBuildFromURLWithF`
- `TestBuildApiDockerFileRemote`

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-03-09 12:03:55 -07:00
Tibor Vass
1ff904e045 Merge pull request #10813 from chenhanxiao/expose-warning-v2
dispatchers: warn user if try to use EXPOSE ip:hostPort:containerPort
2015-03-08 00:30:27 -05:00
Tibor Vass
ecea4a9cc2 Merge pull request #11186 from ahmetalpbalkan/win-cli/TestBuild-case-sensitive-fix
integ-cli: skip case-sensitive dockerfile tests on windows
2015-03-06 13:43:01 -05:00
Tibor Vass
a6ddb8de42 Merge pull request #11148 from ahmetalpbalkan/win-cli/chmod-x-fix
pkg/archive: adjust chmod bits on windows
2015-03-06 12:28:58 -05:00
Ahmet Alp Balkan
d046f56e88 integ-cli: skip case-sensitive dockerfile tests on windows
The tests end up overwriting the `dockerfile` with `Dockerfile` since
windows filesystems are case-insensitive. The following methods are
skipped:

- TestBuildRenamedDockerfile
- TestBuildFromMixedcaseDockerfile

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-03-05 15:50:15 -08:00
Chen Hanxiao
26e85b0db1 dispatchers: warn user if try to use EXPOSE ip:hostPort:containerPort
We could use EXPOSE ip:hostPort:containerPort,
but actually it did as EXPOSE ::containerPort

commit 2275c833 already warned user on daemon side.
This patch will print warning message on client side.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2015-03-04 21:09:50 -05:00
Ahmet Alp Balkan
1a22418f9f pkg/archive: adjust chmod bits on windows
This change modifies the chmod bits of build context archives built on
windows to preserve the execute bit and remove the r/w bits from
grp/others.

Also adjusted integ-cli tests to verify permissions based on the platform
the tests are running.

Fixes #11047.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-03-04 14:10:37 -08:00
Doug Davis
5c05b5c992 Add an HTTP Last-Modified header testcase
Make sure ADD uses the Last-Modified as the mtime of the file.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-03-04 13:32:38 -08:00
Doug Davis
15924f2385 Support dockerfile and Dockerfile
Closes #10807

Adds support for `dockerfile` ONLY when `Dockerfile` can't be found.
If we're building from a Dockerfile via stdin/URL then always download
it a `Dockerfile` and ignore the -f flag.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-03-03 18:38:50 -08:00
Jessie Frazelle
bcbe70588d Merge pull request #11029 from brahmaroutu/fixtest_10963
When --net=none enabled, the test uses local filesystem
2015-02-26 17:30:02 -08:00
Srini Brahmaroutu
17b6583a5a When --net=none enabled, the test uses local filesystem
Closes #10963
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-02-26 18:24:34 +00:00
Ahmet Alp Balkan
f6e95ef3a4 integ-cli: a few context cleanups
These cleanup calls were forgotten, adding these to
reduce garbage on windows CI machines.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-02-25 01:09:06 -08:00
Ahmet Alp Balkan
e9e993922d Remove leftover debugging artifact in test
Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-02-24 11:44:14 -08:00
Jessie Frazelle
fd185eddf6 Merge pull request #10908 from duglin/EnvDollarTest
Add a ENV tests with special chars in the values
2015-02-23 15:25:31 -08:00
Jessie Frazelle
ac06d0c46a Merge pull request #10921 from duglin/FixNonverboseBuild
Build w/o verbose hangs w/RUN
2015-02-23 15:15:12 -08:00
Ahmet Alp Balkan
b686b65c9b integ-cli: Skip tests assuming daemon/cli are on the same host
Some integration-cli tests assume daemon and cli are running
on the same machine and therefore they examine side effects
of executed docker commands on docker host by reading files
or running other sort of commands.

In case of windows/darwin CLI tests these provide little
or no value and should be OK to skip.

List of skipped tests:
- `TestContainerNetworkMode`
- `TestCpVolumePath`
- `TestCreateVolumesCreated`
- `TestBuildContextCleanup`
- `TestBuildContextCleanupFailedBuild`
- `TestLinksEtcHostsContentMatch`
- `TestRmContainerWithRemovedVolume`
- `TestRunModeIpcHost`
- `TestRunModeIpcContainer`
- `TestRunModePidHost`
- `TestRunNetHost`
- `TestRunDeallocatePortOnMissingIptablesRule`
- `TestRunPortInUse`
- `TestRunPortProxy`
- `TestRunMountOrdering`
- `TestRunModeHostname`
- `TestRunDnsDefaultOptions`
- `TestRunDnsOptionsBasedOnHostResolvConf`
- `TestRunResolvconfUpdater`
- `TestRunVolumesNotRecreatedOnStart`

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-02-23 14:08:05 -08:00
Doug Davis
ed3bc3b986 Add a ENV tests with special chars in the values
Tests a little bit of escaping quotes too

See https://github.com/docker/docker/pull/10431#issuecomment-75163177

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-02-23 11:31:38 -08:00
Alexander Morozov
4ba1128c18 Merge pull request #10871 from ahmetalpbalkan/win-cli/TestBuildAddBadLinks-fix
integ-cli: Fix TestBuildAddBadLinks for windows
2015-02-20 17:27:36 -08:00
Doug Davis
92c353582c Build w/o verbose hangs w/RUN
`docker build -q .` where Dockerfile contains a RUN cmd will hang on the
RUN. It waits for the output stream to close but because of -q we never
attached to the container and end up waiting forever.

The fact that no one noticed this tells me that people may not actually
use -q and if so I wonder if it would make sense to make -q work the may
it does for other commands (like `docker ps`) and make it so it only
shows the container ID at the end.  A -q/quiet option that only hides the
container RUN output apparently isn't really that useful since no one is
using it.  See: https://github.com/docker/docker/issues/4094

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-02-20 13:38:03 -08:00
Ahmet Alp Balkan
d0dc14e5d6 integ-cli: Fix TestBuildAddBadLinks for windows
TestBuildAddBadLinks used to build a path by
concenating unix-style forward slashes. Fixed that
by providing a windows-equivalent using `runtime.GOOS`.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-02-20 13:24:59 -08:00
Ahmet Alp Balkan
4581240e58 integration-cli: pass platform-compatible paths to os.Symlink
Although this doesn't fix the test (os.Symlink is not yet
implemented for Windows), this prevents unix-style paths
from being passed to os.Symlink. Also makes code cleaner
for linux.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-02-20 12:25:10 -08:00
Jessie Frazelle
695bf3348f Merge pull request #10913 from ahmetalpbalkan/win-cli/UnixSpecific-skip
integ-cli: Skip some unix-specific cli tests
2015-02-20 10:33:28 -08:00
Ahmet Alp Balkan
492a58f05f integ-cli: Skip some unix-specific cli tests
Skipping some of the tests closely tied to running in a
unix environment. Windows does not support chmod/chown
and this causes some tests to fail creating desired
behavior.

- `TestBuildWithInaccessibleFilesInContext`: uses chown/chmod
- `TestBuildDockerfileOutsideContext`: uses os.Symlink, not implemented on
  windows
- `TestCpUnprivilegedUser`: uses chmod, and requires 'unprivilegeduser'
  created by Dockerfile (and thus requires to run inside container)
- `TestBuildChownSingleFile`: uses chown

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-02-20 09:51:10 -08:00
kargakis
6ecf23861e Map Commands instead of using them as a slice
The most obvious use case is when one wants to make sure as fast
as possible that a command is a valid Dockerfile command.

Signed-off-by: kargakis <kargakis@users.noreply.github.com>
2015-02-20 15:56:21 +01:00
Ahmet Alp Balkan
967d85a28f integ-cli: Fix path problems in TestBuildRenamedDockerfile
`TestBuildRenamedDockerfile` tests hard-code unix-style
path building. Made use of `path/filepath` to make these
tests work on Windows as well.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-02-19 14:45:26 -08:00
Jessie Frazelle
7829e7b40f Merge pull request #10555 from duglin/MoreRenamedDockerfileTests
Add more tests around using -f Dockerfile via the CLI
2015-02-19 13:59:35 -08:00
Doug Davis
c42d2625d1 Add more tests around using -f Dockerfile via the CLI
Mainly to make sure we don't treat the -f value as relative to the
root of the build context, but instead it must be relative to the current
dir.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-02-18 14:06:58 -08:00
Jason Sommer
0826ac1581 Fixed relative filepath check
Signed-off-by: Jason Sommer <jsdirv@gmail.com>
2015-02-16 20:38:52 -06:00
Ahmet Alp Balkan
2f53820ce4 TestBuildAddTarXz: xz with '-k' due to msys bug
TestBuildAddTarXz/TestBuildAddTarXzGz make exec calls like
'cd %SOME_TEMP_DIR%; xz test.gz' but this fails when called
from integration-cli tests (doesn't fail from msys or cmd shell).

It fails with error: "xz: test.tar: Cannot remove: Permission denied."
Proposing workaround of using the `xz --keep` argument since keeping
test.tar is harmless and it's already in os.TempDir().

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-02-12 15:42:27 -08:00
Ahmet Alp Balkan
ccde3a1f73 Create builder/command, cut libcontainer dependency on integration-cli
d1e9d07c introduces a dependency to libcontainer and other daemon
related packages through builder package. The only thing test needs
is set of the Dockerfile commands. Extracting them to a separate
package.

This was causing CI tests to not to compile on non-Linux platforms.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-02-11 21:44:31 -08:00
Doug Davis
1654dfdf14 Show err msg on empty 'scratch' Dockerfile
If you have a Dockefile with just:
   FROM scratch

An error is generated but its never shown to the CLI. This PR fixes that.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-02-10 11:43:45 -08:00
Alexander Morozov
d14751bf30 Merge pull request #10671 from tiborvass/remove-fail-word-from-tests
Remove word "fail" from tests
2015-02-09 20:53:15 -08:00
Tibor Vass
aadb6289cc Remove word "fail" from tests
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-02-09 18:01:52 -05:00
Doug Davis
d1e9d07c1b Get list of Dockerfile cmds from builder so we can be smarted in our tests
Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-02-08 08:09:02 -08:00
Doug Davis
e4f02abb51 Add support for no-arg commands in Dockerfile
We're hoping to add some new commands that don't have any args so this
PR will enable that by removing all of the hard-coded checks that require
commands to have at least one arg.  It also adds some checks to each
command so we're consistent in the error message we get.  Added a test
for this too.

We actually had this check in at least 3 different places (twice in the
parser and once in most cmds), this removes 2 of them (the parser ones).

Had to remove/modify some testcases because its now legal to have certain
commands w/o args - e.g. RUN. This was actually inconsistent because
we used to allow "RUN []" but not "RUN" even though they would generate
(almost) the same net result.  Now we're consistent.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-02-08 03:36:49 -08:00
Alexander Morozov
f208201375 Merge pull request #10607 from chenhanxiao/enable-upper-proto
nat: enable upper case proto
2015-02-07 16:56:35 -08:00
Chen Hanxiao
0552f1a0ca docker_cli_build_test: add testcase of EXPOSE 5678/UDP
test whether we could use upper case proto in EXPOSE

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2015-02-08 07:04:22 +08:00
André Martins
ab4bc988bc Fixed one small typo of docker_cli_build_test.go
Signed-off-by: André Martins <martins@noironetworks.com>
2015-02-07 15:37:58 +00:00
Brian Goff
c73e3bf4dc Error out if file in container at volume path
Fixes #4393

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-02-06 18:00:00 -05:00
Doug Davis
3859c48531 Remove leading/trailing spaces in builder/parser
Per Erikh's suggestion at:
https://github.com/docker/docker/pull/9989#issuecomment-69832009
this PR will trim spaces in the parser to ensure that the user gets the same
results irrespetive of leading/trailing spaces.

Per @tiborvass's suggestion I added a test to make sure spaces in quotes
are not touched.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-02-06 08:52:18 -08:00
Tibor Vass
73d5baf585 builder: prevent Dockerfile to leave build context
Signed-off-by: Tibor Vass <teabee89@gmail.com>
2015-02-02 23:40:24 -08:00
Tibor Vass
70fbd45a5c Merge pull request #10123 from duglin/Issue10097
Build CMD/ENTRYPOINT cache strings properly
2015-01-28 14:43:16 -05:00
Tianon Gravi
142369456d Update TestBuildWithTabs to allow for the "\t"-equivalent "\u0009" (for Go 1.3 support)
This is literally the only failing test on Go 1.3.3: 🎉
```
--- FAIL: TestBuildWithTabs (0.43 seconds)
	docker_cli_build_test.go:4307: Missing tabs.
		Got:["/bin/sh","-c","echo\u0009one\u0009\u0009two"]
		Exp:["/bin/sh","-c","echo\tone\t\ttwo"]
```

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2015-01-20 12:11:59 -07:00
Tibor Vass
50ff27caa1 Merge pull request #9826 from icecrime/8318_whitespace_add_copy
Support whitespace in paths for ADD and COPY
2015-01-19 18:37:53 -05:00
Doug Davis
88905793ad Build CMD/ENTRYPOINT cache strings properly
Make sure that as we build the CMD/ENTRYPOINT cache strings that we don't
treat ["echo","hi"] and ["echo hi"] as the same thing due to the fact that
we're just doing a strcat on the array.

Closes #10097

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-01-15 12:49:30 -08:00
Erik Hollensbe
39343b8618 Fix a panic where RUN [] would be supplied.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2015-01-14 16:55:56 -08:00