Commit Graph

61 Commits

Author SHA1 Message Date
8b12ac14d7 API: Provide the HostConfig during "run".
Currently, the HostConfig is only passed from the CLI to Docker only
when issuing a docker create, but not when doing a docker run.

In the near future, in order to allocate ports at creation time rather
than start time, we will need to have the HostConfig readily available
at container creation.

This PR makes the client always pass the HostConfig when creating a
container (regardless of whether it's for a run or create).

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Upstream-commit: 1df87b95066198c30312147393c18e0be0564fd0
Component: engine
2014-09-25 15:24:38 -07:00
d851131502 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.
Upstream-commit: d369612b416484301e172bfae3fc692e9c176faf
Component: engine
2014-09-25 12:45:48 -04:00
cdd6c2350b 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)
Upstream-commit: a5ca549a18fb5c1006005cc220ab330eec3018de
Component: engine
2014-09-25 09:44:19 -07:00
3c0e9292e2 Merge pull request #8186 from duglin/ErrInCopyCache
Make sure COPY/ADD on dirs doesn't grab too many files
Upstream-commit: 81a643211bbd88545d21550defc9cd7e3f8437bd
Component: engine
2014-09-23 15:16:57 -07:00
c65c43b413 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>
Upstream-commit: cd329d062bddaffcfea3ac0cd3245c0be5bf5542
Component: engine
2014-09-23 14:16:00 -07:00
e73a233371 builder: properly communicate onbuild trigger information during
subsequent builds.

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 8edacc673a0ecb4320377457f0bf9dbdaa08f843
Component: engine
2014-09-23 13:55:51 -07:00
62b6528cbb builder: Appropriately initialize the Cmd in runconfig.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 1e93639aed80588e70e65a850b7c7843d381d3dd
Component: engine
2014-09-22 23:10:05 -07:00
1ce355084d Split volumes out from daemon
Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: cpuguy83)
Upstream-commit: 45407cf00af95b04dd2ff11ce330dd397bf1e095
Component: engine
2014-09-19 17:47:47 -05:00
55b8ec78cc 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>
Upstream-commit: 05b8a1eb363ce03a9dfa3315fbac59c42af2df54
Component: engine
2014-09-18 20:12:13 -07:00
bafb79990e Merge pull request #8097 from erikh/builder_maintainers
Add a new MAINTAINERS file for the builder.
Upstream-commit: f8be5f586f440b93affdff5ae182dc9e0dc98966
Component: engine
2014-09-17 15:42:34 -07:00
d03dfb81a2 Add a new MAINTAINERS file for the builder.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 1ff1befd12027f9de33f715e241a9818ee9a4a41
Component: engine
2014-09-17 15:36:04 -07:00
18373aa635 Removed runconfig.ParseSubcommand
Removed runconfig.ParseSubcommand, changed it to runconfig.Parse and editted related tests and modules

Signed-off-by: Oh Jinkyun <tintypemolly@gmail.com>
Upstream-commit: 9aa71549d61875fcf0713a9da11b034e70e1c3b0
Component: engine
2014-09-17 14:38:22 -07:00
b0b8a2773b tarsum: name collision fix
If a tar were constructed with duplicate file names, then depending on
the order, it could result in same tarsum.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: c5e6362c53cbbc09ddbabd5a7323e04438b57d31
Component: engine
2014-09-17 14:37:46 -04:00
d25c9ab27a Merge pull request #8062 from vishh/run_in_phase2
Add support for 'docker exec' - phase 2
Upstream-commit: 00fd008170e463426001ec4c56fc4c39450fd8d0
Component: engine
2014-09-16 23:56:12 +04:00
b4607092ee Refactor all pre-compiled regexp to package level vars
Addresses #8057

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
Upstream-commit: 4119c9d7d955757092adc3410da8d75f972bd3c1
Component: engine
2014-09-16 12:57:44 -04:00
a11625614e Adding support for docker exec in daemon.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: 5130fe5d38837302e72bdc5e4bd1f5fa1df72c7f
Component: engine
2014-09-15 16:57:52 +00:00
f867da582c Adding Exec method to native execdriver.
Modified Attach() method to support docker exec.

Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: f3c767d798f945192d32441cf624bdd54e746b74
Component: engine
2014-09-15 16:57:52 +00:00
8ef9f79072 clean up the context when a build fails
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 31c0039022234972c79947a6299c0fa382436487
Component: engine
2014-09-15 16:01:23 +03:00
3fd5e4c058 Merge pull request #7983 from vbatts/vbatts-tarsum_switch_names
tarsum: TarSum should be the interface
Upstream-commit: 23f490427f80f6b48f19767cbebb10ddff6997f3
Component: engine
2014-09-12 17:01:35 -04:00
2d65e30419 builder: Fix an error check being done at the wrong spot in run
dispatcher

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 91bed436215f272c2956abb969425ee0bfd3a998
Component: engine
2014-09-11 06:00:24 -07:00
d8ce78da21 Do not populate path to prevent runconfig merge conflict; remove
autoConfig seeding of entrypoint.

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 92f885d7bd9d4a8f5d30ec650a7625a8727d952e
Component: engine
2014-09-11 06:00:24 -07:00
b3a58e1095 evaluator: ensure entrypoint stays blank if set blank while CMD is set.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 78a847a47ac777f4090c06a82e875ee30f9a1cbd
Component: engine
2014-09-11 06:00:24 -07:00
76991d395e builder: Fix entrypoint and cmd semantics in evaluator. Test c/o @cnf
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: ac107995ae4a24195f8bb6b70c26393a87d19982
Component: engine
2014-09-11 06:00:24 -07:00
a3d374a131 builder: Fix a small bug that could improperly cache.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 3a6d1228a83ba0f9dd96138ccccfa758c0956a62
Component: engine
2014-09-11 06:00:24 -07:00
35b33a60e1 builder/parser: fix handling of empty strings as the only argument.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 6b322ad2d32b1525ad01611f0d6ad8d803f5f6f0
Component: engine
2014-09-11 06:00:24 -07:00
c4ae3304f1 builder/parser/dumper: Handle newlines appropriately.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 234f0e4f79c27a4820f75a504fdcd45b2981a68a
Component: engine
2014-09-11 06:00:24 -07:00
4dcbf56012 tarsum: TarSum is not the interface
don't export the exsisting TarSum struct and call the interface 'TarSum'
instead.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: ec01eb653db9d5e5b9291c1670dde57e7f742874
Component: engine
2014-09-10 21:56:20 -04:00
5f275ccb1b TarSum: versioning
This introduces Versions for TarSum checksums.
Fixes: https://github.com/docker/docker/issues/7526

It preserves current functionality and abstracts the interface for
future flexibility of hashing algorithms. As a POC, the VersionDev
Tarsum does not include the mtime in the checksum calculation, and would
solve https://github.com/docker/docker/issues/7387 though this is not a
settled Version is subject to change until a version number is assigned.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 747f89cd327db9d50251b17797c4d825162226d0
Component: engine
2014-09-10 15:41:52 -04:00
ca58c61a83 Merge pull request #7759 from unclejack/pull_latest_by_default
make docker pull only the latest tag by default
Upstream-commit: 85314e7e58a17cf3ebc4b29511b3399cd758b1ae
Component: engine
2014-09-08 13:43:21 -07:00
78de9287f3 Fix race between dispatchers.run and toDisk
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: f17410da5e4b5fa0e0dd2614f9b6e00dbcf66da6
Component: engine
2014-09-04 19:43:28 +04:00
e883336648 docker build: pull just latest if tag uspecified
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 6ba5d67a51d96e6c2923227c99ee049bbf8e5f50
Component: engine
2014-09-03 18:32:47 +03:00
ba6779868a Add a progress bar for ADD <url> <dst>
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 4e40d09a2b13c1f7886783fa66b9fdfeb5369375
Component: engine
2014-09-03 00:17:08 +00:00
a74340a9e1 Merge pull request #7839 from LK4D4/embed_state_to_container
Use State as embedded to Container
Upstream-commit: f74b901da61fdd535e22f322b5cf1cc3f74e0935
Component: engine
2014-09-02 15:18:32 -07:00
13e3017817 Use State as embedded to Container
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: e0339d4b88989a31b72be02582eee72433d2f0ec
Component: engine
2014-09-03 00:01:11 +04:00
9046d6de2c clean up context on build completion & add test
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 18587469789594f7ca26fc942c6d23b971a14dd3
Component: engine
2014-09-02 17:35:25 +03:00
3c324ec48a Fix panic when ENV ARG=ARG is used.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: a0255ba502d7a60a297aa67604eae75a9e1fbed3
Component: engine
2014-08-31 05:39:36 -07:00
5c6641e945 builder: Refactors according to @tiborvass's comments
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 2ef1dec7e8d405f237b68ca104d457d78b8caed1
Component: engine
2014-08-27 18:52:30 -07:00
4308bf42dd builder: several fixups from comments
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 305f73508022d0a3af65faa327aa798610969875
Component: engine
2014-08-27 18:52:30 -07:00
8812387cab builder: move the evaluator package code directly into builder
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: a1522ec01c21807e657e840760a8186f482f2271
Component: engine
2014-08-27 18:52:30 -07:00
e5b50b40c8 builder: Fix handling of ENV references that reference themselves, plus tests.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: cb51681a6db4b7c62d91998ba3b1d3b98c09c61c
Component: engine
2014-08-27 18:52:30 -07:00
b36a54587e builder: fix references to jobs in daemon, make builder a first class
package referring to evaluator

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 1ae4c00a19edb7d3b41c050489e56339833d8e01
Component: engine
2014-08-27 18:52:30 -07:00
5864fecb92 builder: Remove spurious .gitignores
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 3dfe5ddfb98a36ddcf2480720255a3a00f5fbc1d
Component: engine
2014-08-27 18:52:30 -07:00
6e79082f26 builder/parser: Rewrite Parse() to use := instead of var
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 248f4c4f751b76f330278b04d2297bfcf97eec48
Component: engine
2014-08-27 18:52:30 -07:00
79129740f8 builder: Remove blankNode(), use &Node{} instead.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 135f54ccbfb6f638b4ab0be67a215adbad246ecb
Component: engine
2014-08-27 18:52:30 -07:00
27916f0d04 builder: handle certain classes of JSON errors gracefully
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 21b15ac920d5e51f636d7febf07a4a52f5e61bff
Component: engine
2014-08-27 18:52:30 -07:00
b8ca57b41d builder: negative test support, fix for shykes's broken dockerfile
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 4122a981ae12851f71bbf6ec46e03bba288e4143
Component: engine
2014-08-27 18:52:30 -07:00
1fe3a4f0e3 builder: comments / documentation
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 3f5f6b038f56bc89d39a74fbb9c765daf98ae4d8
Component: engine
2014-08-27 18:52:30 -07:00
8d44d56320 builder: add command handling to evaluator.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: d6c0bbc3cbf9204c506fedf4d0c5a477c7559a1d
Component: engine
2014-08-27 18:52:30 -07:00
e1413bfc9f builder: rewrote NewBuildFile according to tibor's comments
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: bb36902db60d5d4e3b18bc018212e40df2d412e8
Component: engine
2014-08-27 18:52:29 -07:00
68301c3828 builder: parser and beginnings of the evaluator
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 22c46af4b358cf3ec4f7af47c701064c00cf7de4
Component: engine
2014-08-27 18:52:29 -07:00