Commit Graph

29 Commits

Author SHA1 Message Date
David Calavera f9b857a200 Move StrSlice to types.
This is a very docker concept that nobody elses need.
We only maintain it to keep the API backwards compatible.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-22 13:31:43 -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
Vincent Demeester 64d70de0a2 Merge pull request #18721 from tiborvass/remove-dependencies-from-builder
Remove image and daemon dependencies from builder
2015-12-18 17:19:55 +01:00
Tibor Vass b0d9476153 builder: remove daemon dependency in ContainerAttach
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-12-17 16:57:08 +01:00
Tibor Vass 03a170c48d builder: remove daemon dependency in ContainerCreate()
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-12-17 16:57:08 +01:00
Tibor Vass 9be1ec60d4 builder: remove dependency on image
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-12-16 19:25:03 +01:00
Anusha Ragunathan 89ab39b050 Remove Mount/Unmount from Builder interface.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2015-12-16 09:11:57 -08:00
Tibor Vass 93c0de2af4 builder: remove unused Retain/Release and put Mount/Unmount back
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-12-15 17:24:07 +01:00
Tibor Vass c70f8b3c9c builder: remove container package dependency
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-12-15 17:24:07 +01:00
Aaron Lehmann 572ce80230 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>
2015-12-09 19:13:35 -08:00
Morgan Bauer 63fb931a0b
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>
2015-12-07 09:03:25 -08:00
David Calavera 6bb0d1816a 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>
2015-12-03 17:39:49 +01: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
Antonio Murdaca 1a0b483e02 runconfig: split resources into a struct
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-11-20 19:40:01 +01:00
NIWA Hideyuki 5aeaf2a0c4 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>
2015-11-20 09:24:18 +09:00
Darren Stahl 9db5db1b94 This fixes the case where arguments are escaped twice from Dockerfiles on
Windows

Signed-off-by: Darren Stahl <darst@microsoft.com>
2015-11-13 10:43:06 -08:00
David Calavera 35d9bcdb57 Merge pull request #17732 from Microsoft/sjw/archive_access_time_fix
Fixing last access time on Windows to unblock python.
2015-11-10 13:17:03 -08:00
Antonio Murdaca 343c8547df Merge pull request #17762 from LK4D4/builder_commit
Use name instead of container in Commit
2015-11-08 15:57:13 +01: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
Alexander Morozov 38e34cf6da Use name instead of container in Commit
It will make daemon interface separation easier later.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-11-06 10:22:00 -08:00
Stefan J. Wernli 37ba67bf63 Fixing last access time on Windows to unblock python.
Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
2015-11-05 12:15:18 -08:00
David Calavera 3a49765046 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>
2015-11-04 12:27:47 -05:00
David Calavera 4f2a5ba360 Decouple daemon and container to stop and kill containers.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-11-04 12:27:47 -05:00
John Howard d5c85897f4 Windows: Allows --isolation on docker build
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-10-30 11:14:38 -07:00
Lei Jitang 9392de9dfe Fix cancel build doesn't remove the intermediate container
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-10-16 05:18:10 -04:00
Doug Davis 4920d40093 Add useful info to builder cache logrus.Debug
Closes: #16790

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-10-10 05:53:06 -07:00
John Howard 9cd84e405d Windows: Regression re-fix builder
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-10-07 15:57:37 -07:00
Tibor Vass e0ef11a4c2 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>
2015-10-06 19:10:19 -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
Renamed from builder/internals.go (Browse further)