Commit graph

449 commits

Author SHA1 Message Date
Daniel Nephin
9e19b4839f Move ValidateContextDirectory to the one package that uses it.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-12-28 11:22:39 -05:00
David Calavera
9dc7d07fc1 Remove timeout shared function.
Handle timeouts when it's necessary based on a Timeout interface.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-14 14:24:21 -05:00
Tibor Vass
63e3816c1d utils: move dockerignore function to builder/dockerignore
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-12-14 14:59:52 +01:00
Tibor Vass
135cca6f52 utils: move git functions to pkg/gitutils
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-12-14 14:59:52 +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
Vincent Demeester
8054a30387 dockerversion placeholder for library import
- Add a *version* file placeholder.
- Update autogen and builds to use it and an autogen build flag

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-11-09 19:32:46 +01:00
Brian Goff
b78ca243d9 Revert "dockerversion placeholder for library-import"
This reverts commit d5cd032a86.

Commit caused issues on systems with case-insensitive filesystems.
Revert for now

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-10-27 21:23:53 -04:00
Vincent Demeester
d5cd032a86 dockerversion placeholder for library-import
- Move autogen/dockerversion to version
- Update autogen and "builds" to use this package and a build flag

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-10-27 20:36:07 +01:00
David Calavera
d6d60287ee Move volume name validation to the local driver.
Delegate validation tasks to the volume drivers. It's up to them
to decide whether a name is valid or not.
Restrict volume names for the local driver to prevent creating
mount points outside docker's volumes directory.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-10-21 12:28:26 -04: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
David Calavera
cfd3080a80 Merge pull request #15898 from Microsoft/15775-buildcontextfix
Windows: Fix long path handling for docker build
2015-09-17 09:19:23 -07:00
Stefan J. Wernli
9b648dfac6 Windows: Fix long path handling for docker build
Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
2015-09-15 10:58:11 -07:00
Brian Goff
e91f2c26ce Merge pull request #15069 from duglin/UseErrorPackage
Use the new error package
2015-09-15 09:28:53 -04:00
Doug Davis
628b9a41b0 Use the new error package
This is the first step in converting out static strings into well-defined
error types.  This shows just a few examples of it to get a feel for how things
will look. Once we agree on the basic outline we can then work on converting
the rest of the code over.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-09-14 13:11:01 -07:00
David Calavera
719886d435 Make RegistryConfig a typed value in the api.
Remove possible circular dependency that prevented us from using a real
type.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-09-07 19:29:33 -04:00
Alexander Morozov
6bca8ec3c9 Replace GenerateRandomID with GenerateNonCryptoID
This allow us to avoid entropy usage in non-crypto critical places.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-07-28 22:31:01 -07:00
Hu Keping
17ce34116a golint: use golint to check package util
Signed-off-by: Hu Keping <hukeping@huawei.com>
2015-07-22 05:34:13 +08:00
David Calavera
333ac3a3eb Plugins JSON spec.
Allow full configuration of external plugins via a JSON document.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-06-29 10:32:18 -07:00
Tonis Tiigi
7f7ebeffe8 Fix breakouts from git root during build
Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com>
2015-06-01 22:10:55 +03:00
David Calavera
81fa9feb0c Volumes refactor and external plugin implementation.
Signed by all authors:

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Signed-off-by: David Calavera <david.calavera@gmail.com>
Signed-off-by: Jeff Lindsay <progrium@gmail.com>
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Signed-off-by: Luke Marsden <luke@clusterhq.com>
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-05-21 20:34:17 -07:00
Arnaud Porterie
ca6722f1c5 Add DOCKER_EXPERIMENTAL environment variable
The DOCKER_EXPERIMENTAL environment variable drives the activation of
the 'experimental' build tag.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-05-20 12:21:17 -07:00
Tianon Gravi
223d6de728 Move WriteFlusher out of utils into ioutils
Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2015-05-08 12:33:33 -06:00
David Calavera
49fd83a25e Use git url fragment to specify reference and dir context.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-05-04 09:28:06 -07:00
David Calavera
1cfb307d70 Remove duplicated git clone logic.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-04-24 09:39:45 -07:00
Antonio Murdaca
4b9fe9c298 Remove job from container_inspect
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-23 00:58:13 +02:00
David Calavera
3b05005a12 Add flusher check to utils.WriteFlusher.
That way we can know when the stream has been flushed.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-04-20 14:25:45 -07:00
Antonio Murdaca
c30a55f14d Refactor utils/utils, fixes #11923
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-14 01:37:36 +02:00
Michael Crosby
b5c3d01e6b Merge pull request #12044 from reteptilian/11721-remove-randomstring-3
fixes 11721 replace stringutils.GenerateRandomString with stringid.GenerateRandomID
2015-04-13 13:47:50 -07:00
Eric Windisch
ca37301d54 Link to HTTPS URLs in engine comments
Updates most of the instances of HTTP urls in the engine's
comments. Does not account for any use in the code itself,
documentation, contrib, or project files.

Signed-off-by: Eric Windisch <eric@windisch.us>
2015-04-11 13:31:34 -04:00
Antonio Murdaca
01724c1cf1 Refactor ultis/utils_daemon, fixes #11908
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-03 20:20:04 +02:00
Peter Esbensen
6896016b7c Fixes #11721 removed GenerateRandomString
Signed-off-by: Peter Esbensen <pkesbensen@gmail.com>

gofmt

Signed-off-by: Peter Esbensen <pkesbensen@gmail.com>
2015-04-02 08:07:52 -07:00
Michael Crosby
00a15227f8 Merge pull request #11893 from runcom/11892-refactor-utils-flags
Refactor utils/flags.go
2015-03-30 13:35:40 -07:00
Michael Crosby
70a479dda5 Merge pull request #11900 from runcom/11899-refactor-utils-http
Refactor utils/http.go
2015-03-30 13:11:45 -07:00
Antonio Murdaca
0995ab5946 Refactor utils/http.go, fixes #11899
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-30 17:59:57 +02:00
Antonio Murdaca
f1bbc1f34f Refactor utils/tmpdir.go, fixes #11905
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-29 20:56:07 +02:00
Antonio Murdaca
5670c6c695 Refactor utils/flags.go, fixes #11892
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-29 03:22:46 +02:00
Antonio Murdaca
6f4d847046 Replace aliased imports of logrus, fixes #11762
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-26 23:22:04 +01:00
bobby abbott
0cd6c05d81 Fixes hacks from progressreader refactor
related to #10959

Signed-off-by: bobby abbott <ttobbaybbob@gmail.com>
2015-03-25 18:21:02 -07:00
Rick Wieman
772833274f Moved pidfile from utils to pkg
Fixes #10958 by moving utils.daemon to pkg.pidfile.
Test cases were also added.
Updated the daemon to use the new pidfile.

Signed-off-by: Rick Wieman <git@rickw.nl>
2015-03-24 23:59:32 +01:00
Antonio Murdaca
b80fae7356 Refactor pkg/common, Fixes #11599
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-24 18:19:59 +01:00
Andy Goldstein
a2b0c9778f Add ability to refer to image by name + digest
Add ability to refer to an image by repository name and digest using the
format repository@digest. Works for pull, push, run, build, and rmi.

Signed-off-by: Andy Goldstein <agoldste@redhat.com>
2015-03-17 10:10:42 +00:00
Alexander Morozov
8ae20d8eba Merge pull request #10977 from robertabbott/10959-progressreader
Moves progressreader from utils to its own package
2015-03-16 12:45:33 -07:00
Rik Nijessen
1ec2eac50d Make utils_daemon and volumes cross-platform compileable.
Signed-off-by: Rik Nijessen <riknijessen@gmail.com>
2015-03-16 11:46:07 +01:00
bobby abbott
12b278d354 Remove import to utils in progressreader
Added method in StreamFormatter to handle calls
from progressreader. Solves #10959

Signed-off-by: bobby abbott <ttobbaybbob@gmail.com>
2015-03-11 00:50:27 -07:00
Martijn Dwars
e2b8933d21 Move directory size calculation to pkg/ (fixes #10970)
Signed-off-by: Martijn Dwars <ikben@martijndwars.nl>
2015-03-04 21:16:31 +01:00
Phil Estes
f5850e8e30 Merge pull request #11017 from brahmaroutu/random_10962
moving random.go from utils
2015-02-26 21:35:42 -05:00
Srini Brahmaroutu
53ece336dc moving random.go from utils
Closes #10962
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-02-26 18:31:18 +00:00
Rik Nijessen
690a85797e Move TimeoutConn to seperate pkg dir.
Fixes #10965
Signed-off-by: Rik Nijessen <riknijessen@gmail.com>
2015-02-25 17:09:47 +01:00
Srini Brahmaroutu
7a9c944b82 Removing dependencies from pkg into Docker internal code
Closes #10922

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-02-23 18:43:10 +00:00
Srini Brahmaroutu
6871b9b16a Removing -X flag option and autogenerated code to create Dockerversion.go functionality
Addresses #9207

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-02-20 05:40:12 +00:00