Commit Graph

389 Commits

Author SHA1 Message Date
4ec2693c9e Modify import paths to point to the new engine-api package.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 907407d0b2e5863f0e1b40b93a356bbf03c7b9fb
Component: engine
2016-01-06 19:48:59 -05:00
69f0af2128 Add default PATH to 'scratch' images
Closes #19012

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: d3ea7e80e879b506bddffd51c3ab65b8078a34f4
Component: engine
2016-01-06 09:50:35 -08:00
93f70516e8 Windows: Fix build not to sigsegv
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 1094542c4ca23096b8d3b10f9f86792769c075e5
Component: engine
2016-01-05 16:08:04 -08:00
d1e813dc31 Merge pull request #19092 from anusha-ragunathan/builder-rm-merge
Remove runconfig.Merge
Upstream-commit: df9a3d100574a7f6176b8ca544dad352493686b2
Component: engine
2016-01-05 15:21:24 -05:00
510a74def2 Remove runconfig.Merge
Merge was used by builder and daemon. With this commit, the builder
call has been inlined and the function moved to the daemon package,
which is the only other caller.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: eb4ae8e28aa0baf28d6cde1079a5f9c618d475b2
Component: engine
2016-01-05 11:28:55 -08:00
f688b73835 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>
Upstream-commit: 5190794f1d85d5406611eb69c270df62ac1cdc7f
Component: engine
2016-01-05 10:09:34 -08:00
c43ba74b61 Move the runconfig.Parse() function into the runconfig/opts package.
The parse.go file is used almost exclusively in the client. The few small
functions that are used outside of the client could easily be copied out
when the client is extracted, allowing this runconfig/opts package to
move to the client.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 2b7ad47bd2649c3f164e8b57b31fae313045c8f4
Component: engine
2016-01-04 12:06:29 -05:00
b58ec08634 Use constant instead of "scratch"
Move NoBaseImageSpecifier to a common spot and then use it instead of
"scratch" in a couple of places.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: e6806223e81c916c9b24580b19207271f1a36965
Component: engine
2015-12-31 06:21:56 -08:00
753d6942df Remove the need for runconfig.Parse() in the builder.
By using a container.Config directly.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6dba0b5d89bfa262757493679788b171f23b891c
Component: engine
2015-12-27 19:58:51 -05:00
1cfbdcfe91 Remove package pkg/ulimit, use go-units instead.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 83237aab2b9430a88790467867505cc9a5147f3e
Component: engine
2015-12-23 13:27:58 -05:00
027f002cb3 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>
Upstream-commit: 7ac4232e70fe7cf7318333cd0890db7f95663079
Component: engine
2015-12-22 13:34:30 -05:00
b006691148 Replace usage of pkg/nat with go-connections/nat.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 056e7449039af522fa0a1567ef67916eaa0de93e
Component: engine
2015-12-22 13:31:46 -05:00
7e8fcbf740 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>
Upstream-commit: f9b857a200696b07b67e6a7f94ede32487f5649d
Component: engine
2015-12-22 13:31:43 -05:00
1c5df6581b 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>
Upstream-commit: 60b4db7eb17f4eb509be4a4968364ada2075d60c
Component: engine
2015-12-21 16:38:50 +02:00
cc50cf65a0 Merge pull request #18761 from anusha-ragunathan/add-build-routes
Create build router separate from image router.
Upstream-commit: 92605b823d4facbe9076b58dd0b0d77101529ad9
Component: engine
2015-12-18 21:09:43 +01:00
3a6aede7f5 Merge pull request #18721 from tiborvass/remove-dependencies-from-builder
Remove image and daemon dependencies from builder
Upstream-commit: 64d70de0a2aa29f565336e896b76c23c879a9a98
Component: engine
2015-12-18 17:19:55 +01:00
71b76682f6 Create build router separate from image router.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: f8dc044aecd6fa00c33dc6a72321a3e249a0b40d
Component: engine
2015-12-17 16:56:11 -08:00
1f6b8ad3e8 builder: remove daemon dependency in ContainerAttach
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: b0d947615335fe115b5b93c0c09912a4888e5b29
Component: engine
2015-12-17 16:57:08 +01:00
49f762b669 builder: remove daemon dependency in ContainerCreate()
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 03a170c48d660be72c387f1821ca48a713dd1cea
Component: engine
2015-12-17 16:57:08 +01:00
2723fcf0b2 builder: remove dependency on image
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 9be1ec60d4d4fe63d5ef6e1ec36c585b548a00d0
Component: engine
2015-12-16 19:25:03 +01:00
aed633bad5 Remove Mount/Unmount from Builder interface.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 89ab39b050e0b6bbb7766a4662132b1b7bc8545f
Component: engine
2015-12-16 09:11:57 -08:00
0bf29d425d builder: remove unused Retain/Release and put Mount/Unmount back
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 93c0de2af4f88f68b793a282cb654a14bd32eb3f
Component: engine
2015-12-15 17:24:07 +01:00
bf2423fe8a builder: remove container package dependency
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: c70f8b3c9c7a6dc6a219354acaa2e650d1403ecf
Component: engine
2015-12-15 17:24:07 +01:00
637e991bae dockerfile: get rid of Commit and CommitConfig
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 400e4922cbd004b93774fc55005f74bd8a995242)
Upstream-commit: 2a2d1f57b586632a5304f1093add28ef64661902
Component: engine
2015-12-15 17:23:40 +01:00
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