Commit Graph

21 Commits

Author SHA1 Message Date
Anusha Ragunathan 9c332b164f Remove package daemonbuilder.
Currently, daemonbuilder package (part of daemon) implemented the
builder backend. However, it was a very thin wrapper around daemon
methods and caused an implementation dependency for api/server build
endpoint. api/server buildrouter should only know about the backend
implementing the /build API endpoint.

Removing daemonbuilder involved moving build specific methods to
respective files in the daemon, where they fit naturally.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-02-01 09:57:38 -08:00
Arnaud Porterie 46018c3cee Merge pull request #19837 from cpuguy83/carry_19085
Carry 19085 -- Improve & cleanup documentation comments
2016-01-29 14:30:25 -08:00
Brian Goff 9c09a79ba5 update doc string
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-01-29 15:25:25 -05:00
Anusha Ragunathan 14215ed5a1 Make daemonbuilder.Docker leaner.
Currently builder.Backend is implemented by daemonbuilder.Docker{} for
the daemon. This registration happens in the API/server code. However,
this is too implementation specific. Ideally we should be able to specify
that docker daemon (or any other) is implementing the Backend and abstract
the implementation details. So we should remove package daemonbuilder
dependency in build_routes.go

With this change, daemonbuilder.Docker is nothing more than the daemon.
A follow on change will remove the daemonbuilder package and move relevant
methods under daemon, so that API only knows about the backend.

Also cleanup code in api/client/build.go. docker cli always performs build
context tar download for remoteURLs and sends an empty remoteContext. So
remove relevant dead code.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-01-18 09:16:11 -08:00
Lukas Waslowski a4ce361ac8 Improve docs for Daemon.TagImage and dockerfile.BuildFromConfig.
Signed-off-by: Lukas Waslowski <cr7pt0gr4ph7@gmail.com>
2016-01-08 14:51:09 +01:00
David Calavera 907407d0b2 Modify import paths to point to the new engine-api package.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-06 19:48:59 -05:00
Anusha Ragunathan 5190794f1d Use ImageBuildOptions in builder.
dockerfile.Config is almost redundant with ImageBuildOptions.
Unify the two so that the latter can be removed. This also
helps build's API endpoint code to be less dependent on package
dockerfile.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-01-05 10:09:34 -08:00
Daniel Nephin 83237aab2b Remove package pkg/ulimit, use go-units instead.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-12-23 13:27:58 -05:00
David Calavera 7ac4232e70 Move Config and HostConfig from runconfig to types/container.
- Make the API client library completely standalone.
- Move windows partition isolation detection to the client, so the
  driver doesn't use external types.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-22 13:34:30 -05:00
Anusha Ragunathan f8dc044aec Create build router separate from image router.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2015-12-17 16:56:11 -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
Tibor Vass 2a2d1f57b5 dockerfile: get rid of Commit and CommitConfig
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 400e4922cbd004b93774fc55005f74bd8a995242)
2015-12-15 17:23:40 +01: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
Antonio Murdaca ef1d410b02 fix shm size handling
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-12-01 16:29:40 +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
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
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
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
Morgan Bauer 844fb29619
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>
2015-10-12 16:20:55 -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