Brian Goff
c985302c5c
Fixes re-creating volume on (re)start
...
When a container is restarted all the volume configs are parsed again.
Even if the volume was already handled in a previous start it was still
calling "FindOrCreateVolume" on the volume repo causing a new volume to
be created.
This wasn't being detected because as part of the mount initialization
it checks to see if the the _mount_ was already initialized, but this
happens after the parsing of the configs.
So a check is added during parsing to skip a volume which was already
created for that container.
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2014-10-08 16:25:51 -04:00
Brian Goff
9acf7c765c
Restore volume refs after daemon restart
...
Volume refs were not being restored on daemon restart.
This made it possible to remove a volume being used by other containers
after a daemon restart.
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2014-10-08 14:17:27 -04:00
Daniel, Dao Quang Minh
3b9d88210e
pass extra file to child process as status handler
...
When stdout/stderr is closed prematurely, the proxy's writes to stdout/stderr
(i.e. `log.Errorf/log.Printf`) will returns with EPIPE error, and go runtime
will terminate the proxy when stdout/stderr writes trigger 10 EPIPE errors.
instead of using stdout/stderr as the status handler, we pass an extra file to
the child process and write `0\n` or `1\nerror message` to it and close it
after. This allow the child process to handle stdout/stderr as normal.
Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
2014-10-08 12:53:43 -04: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
Jessica Frazelle
acd511786e
Test for check /etc/resolv.conf on every docker run for 127.* content.
...
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-10-07 16:51:51 -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
Victor Vieux
6157af8292
Merge pull request #8416 from LK4D4/fix_build_cache_test
...
Fix TestBuildCacheADD to check cache in out, not in id
2014-10-06 11:56:18 -07:00
Michael Crosby
128c52f583
Merge pull request #8417 from cpuguy83/8398_fix_automatic_data_copy_for_volumesfrom
...
volumes copying data unexpectedly
2014-10-06 11:43:41 -07:00
Victor Vieux
40070609da
Merge pull request #8369 from vieux/add_test_rm
...
add test and move one from rm to rmi
2014-10-06 11:30:12 -07:00
Brian Goff
e95b6fb648
Fix #8398 - volumes copying data unexpectedly
...
Prior to the volumes re-factor, data was not being copied on
volumes-from or host-mounted volumes.
After the re-factor, data was being copied for volumes-from.
This reverts this unintentional change in behavior.
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2014-10-06 14:21:46 -04:00
Victor Vieux
3e473c08b4
update test
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2014-10-06 18:18:25 +00: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
Andrea Luzzardi
84d9fd37b0
Merge pull request #8392 from jfrazelle/pr_8389
...
Invalid mount mode for volumes in
2014-10-03 17:22:21 -07:00
Jessica Frazelle
b10b458b6e
Add test for invalid mount mode for volumes in.
...
Closes #8389 .
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-10-03 16:17:51 -07:00
Brian Goff
007b4f6340
Fixes bad validMountMode check
...
Needed to check if the mode was invalid and return error, not valid and
return error.
This didn't get picked up because the existing integration-cli tests
were all either expecting errors when a valid mode was passed in (e.g.
"ro" passed in, we expected an error because it was testing write). So
modified a test which was testing for "rw" to actually pass in "rw"
instead of assuming the "rw"
Docker-DCO-1.1-Signed-off-by: Brian Goff <bgoff@cpuguy83-mbp.home> (github: cpuguy83)
2014-10-03 16:55:39 -04:00
Andrea Luzzardi
b669025949
Stable MAC addresses: Add support for MAC address restoring.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2014-10-03 13:46:24 -07:00
Andrea Luzzardi
a487593729
Stable Networking: Keep the same network settings across container restarts.
...
This change will allocate network settings (IP and public ports) at
container creation rather than start and keep them throughout the
lifetime of the container (i.e. until it gets destroyed) instead of
discarding them when the container is stopped.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2014-10-03 13:46:24 -07:00
Victor Vieux
c68e6b15a5
add test and move one from rm to rmi
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2014-10-02 23:39:39 +00:00
unclejack
4424d15f99
Merge pull request #8302 from rafecolton/move_archive_package_to_pkg
...
Move archive package to pkg
2014-10-01 18:03:34 +03: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
Jessica Frazelle
ea09f03682
Filter containers by status.
...
A continuation of #7616 .
Adds `docker ps --filter=status=(restarting|running|paused|stopped)` option.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-09-29 20:11:19 -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
Brian Goff
882223c0f8
Fix #8259 - Can't reuse symlink'd bindmount
...
volumes.Get was not checking for symlinked paths meanwhile when adding a
new volume it was following the symlink.
So when trying to use a bind-mount that is a symlink, the volume is
added with the correct path, but when another container tries to use the
same volume it got a "Volume exists" error because volumes.Get returned
nil and as such attempted to create a new volume.
Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: cpuguy83)
2014-09-26 14:36:44 -04:00
Michael Crosby
0bb5f98731
Merge pull request #8233 from tiborvass/pr-7658
...
Fix Interactive container hangs when redirecting stdout
2014-09-26 11:31:29 -07:00
Tibor Vass
07da2e03b1
Merge pull request #8224 from cpuguy83/7843_fix_start_attach_error_hang
...
Fix #7843 start -a can cause frozen term
2014-09-26 11:54:39 -04:00
Brian Goff
9ae9d7db57
Fix #7843
...
When doing `docker start -a` on a container that won't start, terminal
was getting stuck on the attach, even after container removal.
Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: cpuguy83)
2014-09-26 11:31:02 -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
1379c6ec50
Merge pull request #8193 from jfrazelle/8141-pull-all-image-aliases-for-id
...
Pull all image aliases for id
2014-09-25 15:22:46 -04:00
Tibor Vass
29a62ceefc
Add DockerCli tests
...
Signed-off-by: Tibor Vass <teabee89@gmail.com>
2014-09-25 20:58:43 +02:00
Jessica Frazelle
7d74be162c
Pull all image aliases for id. Closes #8141 .
...
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-09-25 11:48:49 -07:00
Victor Vieux
857b739e29
Merge pull request #8208 from estesp/7851-fix-hostname-fqdn
...
Provide full hostname with domainname to underlying container layer
2014-09-25 11:33:50 -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
Phil Estes
5239ba3d06
Provide full hostname with domainname to underlying container layer
...
Addresses #7851
Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2014-09-25 09:23:39 -04:00
Victor Vieux
a936842208
Merge pull request #8207 from LK4D4/rewrite_more_fixtures_test
...
Rewrite more fixtures test to not use fixtures.
2014-09-24 15:07:03 -07:00
unclejack
f2fad5c290
Merge pull request #8173 from crosbymichael/update-mem-limit
...
Update memory limit for container
2014-09-24 20:55:25 +03: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
Alexandr Morozov
ab4738b49f
Rewrite TestBuildHistory to not use fixtures
...
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-24 12:38:48 +04:00
Alexandr Morozov
1625cbfc4c
Rewrite TestBuildForceRm to not use fixtures
...
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-24 12:29:27 +04:00
Victor Vieux
827634d355
Merge pull request #7973 from LK4D4/persist_execdriver_dir
...
Persist execdriver dir
2014-09-23 16:01:03 -07:00
Victor Vieux
81a643211b
Merge pull request #8186 from duglin/ErrInCopyCache
...
Make sure COPY/ADD on dirs doesn't grab too many files
2014-09-23 15:16:57 -07:00
Doug Davis
cd329d062b
Make sure COPY/ADD on dirs doesn't grab too many files
...
Add check for / first - per LK4D4's comment.
Add a comment to explain why we're adding a /
Signed-off-by: Doug Davis <dug@us.ibm.com>
2014-09-23 14:16:00 -07:00
Erik Hollensbe
8edacc673a
builder: properly communicate onbuild trigger information during
...
subsequent builds.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-09-23 13:55:51 -07:00
Tibor Vass
5ce7ee61ef
Merge pull request #8179 from erikh/parser_fix_cmd_null
...
Parser fix cmd null
2014-09-23 13:42:55 -04:00
Alexandr Morozov
0c899cefdd
Rewrite TestBuildAddWholeDirToRoot to not use fixtures
...
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-23 18:58:32 +04:00
Alexandr Morozov
570f1153b9
Rewrite TestBuildAddEtcToRoot to not use fixtures
...
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-23 18:58:28 +04:00
Alexandr Morozov
c58391bbd0
Rewrite TestBuildAddDirContentToExistDir to not use fixtures
...
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-23 15:15:58 +04:00
Alexandr Morozov
2d802d7f23
Rewrite TestBuildAddDirContentToRoot to not use fixtures
...
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-23 15:15:58 +04:00
Alexandr Morozov
139b6ed3aa
Rewrite TestAddSingleFileToNonExistDir to not use fixtures
...
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-23 15:15:58 +04:00
Alexandr Morozov
6bb44b6d74
Rewrite TestAddSingleFileToExistDir to not use fixtures
...
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-23 15:15:58 +04:00
Alexandr Morozov
5e2ea69606
Rewrite TestAddSingleFileToWorkdir to not use fixtures
...
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-23 15:15:58 +04:00
Alexandr Morozov
682fbe0134
Rewrite TestAddSingleFileToRoot to not use fixtures
...
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-23 15:15:09 +04:00
Alexandr Morozov
3824ec62e8
Rewrite TestBuildSixtySteps to not use fixtures
...
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-23 15:15:09 +04:00
Erik Hollensbe
d1613e1d59
builder: integration-cli test for the previous commit.
...
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-09-22 23:18:46 -07:00
Michael Crosby
9b755412ab
Update memory limit for container
...
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-09-22 21:41:14 +00:00
Alexandr Morozov
652cd6a842
Test on execdriver dir behavior
...
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
2014-09-22 22:49:21 +04:00
unclejack
c6965e3e45
integcli: add & use dockerCmdWithTimeout & InDir
...
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-09-22 21:02:51 +03:00
unclejack
5d1cb9d005
integcli: add util to fetch container status
...
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-09-22 20:34:57 +03:00
unclejack
97b50e0f29
integcli: consolidate cmd exit code processing
...
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-09-22 20:32:50 +03:00
unclejack
77d29847e2
integcli: pull scratch for pull test
...
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-09-22 19:03:19 +03:00
unclejack
c69896d8a0
integcli: fix race in runCommandWithStdoutStderr
...
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-09-22 17:53:12 +03:00
Alexandr Morozov
5ad82d3ea6
Merge pull request #8137 from jfrazelle/8135-event-log-die-start-fail
...
After container fails to start, log the event die.
2014-09-22 12:47:04 +04:00
Jessica Frazelle
d64d55eca8
After container fails to start, log the event die.
...
Fixes #8135 .
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-09-19 16:06:49 -07:00
Brian Goff
45407cf00a
Split volumes out from daemon
...
Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: cpuguy83)
2014-09-19 17:47:47 -05:00
Michael Crosby
63c8b8bf30
Merge pull request #8131 from unclejack/fix_perm_detection
...
integcli: fix permission detection for aufs
2014-09-19 11:55:56 -07:00
Alexandr Morozov
2e2422b0eb
Use prefix naming for rmi tests
...
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-19 22:11:54 +04:00
Alexandr Morozov
cc54b77fce
Use prefix naming for rm tests
...
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-19 22:11:54 +04:00
Alexandr Morozov
1ddd013b19
Use prefix naming for restart tests
...
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-19 22:11:54 +04:00
Alexandr Morozov
00b82fcab6
Use prefix naming for ps tests
...
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-19 22:11:54 +04:00
Alexandr Morozov
6e8c9e7bee
Use prefix naming for port tests
...
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-19 22:11:54 +04:00
Alexandr Morozov
b6325907e9
Use prefix naming for links tests
...
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-19 22:11:54 +04:00
Alexandr Morozov
27a27b7388
Use prefix naming for create tests
...
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-19 22:11:54 +04:00
Alexandr Morozov
66cd3640f1
Use prefix naming for build tests
...
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-19 22:11:50 +04:00
unclejack
1a0347ff1d
integcli: fix permission detection for aufs
...
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-09-19 21:08:57 +03:00
Alexandr Morozov
f312f784e1
Use prefix naming for attach tests
...
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-19 21:56:25 +04:00
Alexandr Morozov
3812a6a846
Use prefix naming for inspect tests
...
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-19 21:56:25 +04:00
Alexandr Morozov
9720078f9e
Use prefix naming for events test
...
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-19 21:56:25 +04:00
Alexandr Morozov
aa536b27a7
Use prefix naming for docker_cli_run_test.go
...
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-19 21:56:24 +04:00
Doug Davis
05b8a1eb36
Add support for copy/add with multiple src files
...
Part one of solution for issue #6820
Signed-off-by: Doug Davis <dug@us.ibm.com>
2014-09-18 20:12:13 -07:00
Jessica Frazelle
42dafe4bd8
test for panic on daemon restart
...
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-09-18 21:54:42 +00:00
Alexandr Morozov
184fe67bbc
Add Build prefix to Copy tests
...
Now we can do "-run TestBuild" to test all build-tests and "-run
TestBuildCopy" for test all copy-tests
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-18 09:09:10 +04:00
Alexandr Morozov
aa0449c813
Fix logDone message for TestCopySingleFileToExistDir
...
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-18 09:02:05 +04:00
Michael Crosby
77d30e7112
Merge pull request #8041 from unclejack/lower_allocations_broadcastwriter
...
lower the number of allocations in broadcastwriter
2014-09-17 15:26:44 -07:00
Alexandr Morozov
c171cf0cc3
Merge pull request #8088 from unclejack/integcli-keep_permissions
...
integcli: run inaccessible context test in tmpdir
2014-09-17 22:06:26 +04:00
unclejack
be924087eb
integcli: run build tests in tmpdir
...
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-09-17 20:05:33 +03:00
unclejack
9ae3134dc9
add the timeutils package
...
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-09-17 14:30:08 +03:00
Jessie Frazelle
f98a1f1f7d
Merge pull request #8019 from thockin/add-host
...
Allow extra lines in /etc/hosts
2014-09-16 17:19:16 -07:00