Commit Graph

365 Commits

Author SHA1 Message Date
1caa5bd099 utils: move dockerignore function to builder/dockerignore
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 63e3816c1dd449de63500a2b5fec9c2a33a0894c
Component: engine
2015-12-14 14:59:52 +01:00
86409751de utils: move git functions to pkg/gitutils
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 135cca6f52c7862f13f50c30ccf5925038ba40a9
Component: engine
2015-12-14 14:59:52 +01:00
3c4fcf6b7a Fix typos found across repository
Signed-off-by: Justas Brazauskas <brazauskasjustas@gmail.com>
Upstream-commit: 927b334ebfc786276a039e45ec097e71bf9a104c
Component: engine
2015-12-13 18:04:12 +02:00
547342d777 Improved push and pull with upload manager and download manager
This commit adds a transfer manager which deduplicates and schedules
transfers, and also an upload manager and download manager that build on
top of the transfer manager to provide high-level interfaces for uploads
and downloads. The push and pull code is modified to use these building
blocks.

Some benefits of the changes:

- Simplification of push/pull code
- Pushes can upload layers concurrently
- Failed downloads and uploads are retried after backoff delays
- Cancellation is supported, but individual transfers will only be
  cancelled if all pushes or pulls using them are cancelled.
- The distribution code is decoupled from Docker Engine packages and API
  conventions (i.e. streamformatter), which will make it easier to split
  out.

This commit also includes unit tests for the new distribution/xfer
package. The tests cover 87.8% of the statements in the package.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 572ce802306a4e919802e5b77cbeca94acda7c0a
Component: engine
2015-12-09 19:13:35 -08:00
b12523fdf4 move configs structs to remove dependency on daemon
- Moved the following config structs to api/types
   - ContainerRmConfig
   - ContainerCommitConfig

Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
Upstream-commit: 63fb931a0b7298c6281898bcc5f53ab0655ad1a6
Component: engine
2015-12-07 09:03:25 -08:00
d010c48ce4 Move Container to its own package.
So other packages don't need to import the daemon package when they
want to use this struct.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 6bb0d1816acd8d4f7a542a6aac047da2b874f476
Component: engine
2015-12-03 17:39:49 +01:00
ec12c4920e fix shm size handling
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: ef1d410b0270fa7309d76aded34113396def7fb2
Component: engine
2015-12-01 16:29:40 +01:00
b13551acbe Merge pull request #18220 from mqliang/temvarible
remove unnecessary temporary variable
Upstream-commit: bb11900393df21002a7608c007c90438522be7dd
Component: engine
2015-11-26 11:40:02 +01:00
e8167fa92b remove unnecessary temporary variable
Signed-off-by: mqliang <mqliang.zju@gmail.com>
Upstream-commit: 478b773fe5aa7b9bdfc571d3e8f8bc3bc47826ea
Component: engine
2015-11-26 10:25:55 +08:00
e105a29374 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>
Upstream-commit: 4352da7803d182a6013a5238ce20a7c749db979a
Component: engine
2015-11-24 09:40:25 -08:00
012bc4d1d4 runconfig: split resources into a struct
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 1a0b483e02aff72c16871fb2f74644e091bda93c
Component: engine
2015-11-20 19:40:01 +01:00
4581692a0e Addition of "--shm-size" to which size of /dev/shm is changed.
- Optional "--shm-size=" was added to the sub-command(run, create,and build).
- The size of /dev/shm in the container can be changed
  when container is made.
- Being able to specify is a numerical value that applies number,
  b, k, m, and g.
- The default value is 64MB, when this option is not set.
- It deals with both native and lxc drivers.

Signed-off-by: NIWA Hideyuki <niwa.hiedyuki@jp.fujitsu.com>
Upstream-commit: 5aeaf2a0c4236711e0981515d8627b30e22a1637
Component: engine
2015-11-20 09:24:18 +09:00
6f1a30b2e2 Merge pull request #17851 from Microsoft/10662-ArgumentEscaping
Prevent double escaping of Dockerfile commands on Windows
Upstream-commit: ad8a66573c61483b9a0721470438dfc8bd01993f
Component: engine
2015-11-14 17:25:53 +01:00
8fdcec54ee Merge pull request #17599 from perhapszzy/master
Add line information in the parsed Dockerfile.
Upstream-commit: a5f3ed4801dd48bec96d96f63a1c5099bd75a2a6
Component: engine
2015-11-13 16:53:59 -05:00
900e412d74 Add line information in the parsed Dockerfile
Signed-off-by: perhapszzy@sina.com <perhapszzy@sina.com>
Upstream-commit: 5b6c4dd3df4d501018268d5c32bf78380923c292
Component: engine
2015-11-13 15:41:12 -05:00
f06cbc085f This fixes the case where arguments are escaped twice from Dockerfiles on
Windows

Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 9db5db1b94bc1000d151315851096dcc6cd3512d
Component: engine
2015-11-13 10:43:06 -08:00
f6690c74eb Merge pull request #17880 from duglin/TweakMap
convert map value from struct to bool
Upstream-commit: 2a7b5f66574f626610f6bfcca86c15263f57c3cc
Component: engine
2015-11-11 13:49:50 +01:00
7a728fd261 Merge pull request #17732 from Microsoft/sjw/archive_access_time_fix
Fixing last access time on Windows to unblock python.
Upstream-commit: 35d9bcdb5778f04b76f781dc56e0668c9383b96c
Component: engine
2015-11-10 13:17:03 -08:00
48fb9e9342 convert map value from struct to bool
Just for @calavera !! :-)
Per: https://github.com/docker/docker/pull/17789#discussion_r44333133

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: fbdce2547f43fdd8184cd906790cd107562734ca
Component: engine
2015-11-10 13:10:35 -08:00
40d3ab07b8 Merge pull request #17789 from duglin/Issue17781
Allow for env vars to have spaces in some cases
Upstream-commit: 014bab03efd67367d13231c08cc43e2e73578824
Component: engine
2015-11-10 08:55:11 -08:00
81b8a4871f 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>
Upstream-commit: 6990f8c6162b5b05118ab54f155eb5d86c85f2d4
Component: engine
2015-11-09 12:42:56 -08:00
62005e81e4 Merge pull request #17762 from LK4D4/builder_commit
Use name instead of container in Commit
Upstream-commit: 343c8547df8154a0e6772fb3acc881e03dc86452
Component: engine
2015-11-08 15:57:13 +01:00
0d89f7eef8 Merge pull request #17710 from tonistiigi/fix-builder-symlinks
Fix symlink handling in builder ADD/COPY commands
Upstream-commit: bf5a6d2a83cafd6f56224cdabd8692890472950a
Component: engine
2015-11-07 16:32:07 -05:00
604c93df88 Merge pull request #17616 from Microsoft/10662-fix-dockerfile-parser
Windows: Fix dockerfile\parser TestTestData unit test
Upstream-commit: 98a1141db96a3b1125471cb14f132b6341db9172
Component: engine
2015-11-07 09:12:43 +01:00
8bd20475ee 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>
Upstream-commit: 47da59f7ec4ee0f49d47a9b32abb137bb30b2c48
Component: engine
2015-11-06 10:58:12 -08:00
cd606dc8e8 Use name instead of container in Commit
It will make daemon interface separation easier later.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 38e34cf6da505ad38f0c4cc2b830becdcf67c58a
Component: engine
2015-11-06 10:22:00 -08:00
ef88e7ace2 Remove LXC support.
The LXC driver was deprecated in Docker 1.8.
Following the deprecation rules, we can remove a deprecated feature
after two major releases. LXC won't be supported anymore starting on Docker 1.10.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 3b5fac462d21ca164b3778647420016315289034
Component: engine
2015-11-05 17:09:57 -05:00
f34b27bbfb Fixing last access time on Windows to unblock python.
Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
Upstream-commit: 37ba67bf636b34dc5c0c0265d62a089d0492088f
Component: engine
2015-11-05 12:15:18 -08:00
b52340d649 Decouple daemon and container to mount and unmount filesystems.
Side effects:
- Decouple daemon and container to start containers.
- Decouple daemon and container to copy files.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 3a497650464b40191bd2cde348e676acf4efe270
Component: engine
2015-11-04 12:27:47 -05:00
41d5167da1 Decouple daemon and container to stop and kill containers.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 4f2a5ba360d0b00213d31f50a5be074c89124c52
Component: engine
2015-11-04 12:27:47 -05:00
d58496e178 Windows: Fix dockerfile\parser unit test
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 864e892e2a310c5b67dfd842e39634dd0d99da73
Component: engine
2015-11-01 20:08:37 -08:00
884d36120f Windows: Allows --isolation on docker build
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: d5c85897f43b1956f874c6c93d10c30b5b82a726
Component: engine
2015-10-30 11:14:38 -07:00
1ff12191d8 Fix dumper program to use proper import
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 1477a3d7fda5e8b29d68ffd5c4d6edead9ba2c61
Component: engine
2015-10-26 13:10:01 -07:00
27d55a1112 Merge pull request #16433 from Microsoft/10662-volumes5
Windows: [TP4] Add volume support
Upstream-commit: e74cf8acad799aff39bf1b8ceffdef471aa0d242
Component: engine
2015-10-23 18:43:07 -04:00
f7f7ce4926 Windows: Add volume support
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: a7e686a779523100a092acb2683b849126953931
Component: engine
2015-10-22 10:42:53 -07:00
954f6f9002 ProcessWord support UTF-8
modified PorcessWord to working normally for UTF-8 strings and added test cases

Signed-off-by: Daehyeok Mun <daehyeok@gmail.com>
Upstream-commit: bb79b7eb9e1db83fd80121b088aa2e5a4c084ace
Component: engine
2015-10-21 10:10:10 -06:00
4dda269d8d Fix cancel build doesn't remove the intermediate container
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 9392de9dfefc851139146161aa322e6c9e74cacf
Component: engine
2015-10-16 05:18:10 -04:00
647970c93e refactor use of container struct from daemon
- use Exists instead of Get
 - push Get inside of daemonbuilder

Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
Upstream-commit: 844fb2961976d1bca52cc8560abf6b1ac2ae754a
Component: engine
2015-10-12 16:20:55 -07:00
f800251e5f Add useful info to builder cache logrus.Debug
Closes: #16790

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 4920d4009330365babd228e6c27e317a672edc87
Component: engine
2015-10-10 05:53:06 -07:00
2e11eb0e71 Windows: Regression re-fix builder
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 9cd84e405d970239df7169e66a099e28311ef614
Component: engine
2015-10-07 15:57:37 -07:00
d8db4defa7 Abstract builder and implement server-side dockerfile builder
This patch creates interfaces in builder/ for building Docker images.
It is a first step in a series of patches to remove the daemon
dependency on builder and later allow a client-side Dockerfile builder
as well as potential builder plugins.

It is needed because we cannot remove the /build API endpoint, so we
need to keep the server-side Dockerfile builder, but we also want to
reuse the same Dockerfile parser and evaluator for both server-side and
client-side.

builder/dockerfile/ and api/server/builder.go contain implementations
of those interfaces as a refactoring of the current code.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: e0ef11a4c2c6789e08b61df082b5b9aa70898e7a
Component: engine
2015-10-06 19:10:19 -04:00
5d2ec8fed8 Move builder files to builder/dockerfile
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: f41230b93a77ca7f4d84718f39a4847b6117f694
Component: engine
2015-10-05 18:26:47 -04:00
d911d85df7 Merge pull request #16490 from Microsoft/10662-mtimefix
Fixed file modified time not changing on windows
Upstream-commit: 134fefbaa2b63e337a5ef247111bb5a2733809be
Component: engine
2015-10-02 12:06:03 -07:00
5b5431a0c1 Fixed file modified time not changing on Windows
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 40b77af234319f02029368732249c2de0babb380
Component: engine
2015-10-01 10:45:32 -07:00
69db6279aa Revert "Merge pull request #16228 from duglin/ContextualizeEvents"
Although having a request ID available throughout the codebase is very
valuable, the impact of requiring a Context as an argument to every
function in the codepath of an API request, is too significant and was
not properly understood at the time of the review.

Furthermore, mixing API-layer code with non-API-layer code makes the
latter usable only by API-layer code (one that has a notion of Context).

This reverts commit de4164043546d2b9ee3bf323dbc41f4979c84480, reversing
changes made to 7daeecd42d7bb112bfe01532c8c9a962bb0c7967.

Signed-off-by: Tibor Vass <tibor@docker.com>

Conflicts:
	api/server/container.go
	builder/internals.go
	daemon/container_unix.go
	daemon/create.go
Upstream-commit: b08f071e18043abe8ce15f56826d38dd26bedb78
Component: engine
2015-09-29 14:26:51 -04:00
fef14476a9 Revert "Merge pull request #16567 from calavera/context_per_request"
This reverts commit ff92f45be49146cd7ac7716c36d89de989cb262e, reversing
changes made to 80e31df3b6fdf6c1fbd6a5d0aceb0a148066508c.

Reverting to make the next revert easier.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 79c31f4b13d331d4011b2975a96dcdeab2036865
Component: engine
2015-09-29 13:40:46 -04:00
24818bd478 Merge pull request #16590 from Microsoft/10662-escapeargsfix
Windows: Flags to cmd are now sent as two separate arguments
Upstream-commit: f0e904df8e840911401b73e2f0a24e16b2eb0305
Component: engine
2015-09-25 13:29:54 -07:00
b31922f0fe Merge pull request #16567 from calavera/context_per_request
Define a context per request.
Upstream-commit: ff92f45be49146cd7ac7716c36d89de989cb262e
Component: engine
2015-09-25 13:01:51 -07:00
49fc637581 Flags to cmd are now sent as two separate arguments
This fixes a regression caused by PR #16538.

Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 5aa7c2317a253d88023b6285e50cd660fa351d77
Component: engine
2015-09-25 10:37:53 -07:00
556d0a0826 refactor create to not expose internal data structures
- use existing exposed type

Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
Upstream-commit: 93bd57b0b21e1a802b80388c8fc034780e3200fc
Component: engine
2015-09-25 09:35:18 -07:00