Commit Graph

435 Commits

Author SHA1 Message Date
f91e0804c7 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>
Upstream-commit: 719886d4352cba3f2cd0092e052bb4cb67d51417
Component: engine
2015-09-07 19:29:33 -04:00
67bf5ba305 Replace GenerateRandomID with GenerateNonCryptoID
This allow us to avoid entropy usage in non-crypto critical places.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 6bca8ec3c9ccc169c53b3d7060fe5c8ba8670aac
Component: engine
2015-07-28 22:31:01 -07:00
4874e6060c golint: use golint to check package util
Signed-off-by: Hu Keping <hukeping@huawei.com>
Upstream-commit: 17ce34116af4e8c6b66d0c7906efcae2fd75efc6
Component: engine
2015-07-22 05:34:13 +08:00
7b3bea6e05 Plugins JSON spec.
Allow full configuration of external plugins via a JSON document.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 333ac3a3eb09c29c42fe2cea1680621700b67b2f
Component: engine
2015-06-29 10:32:18 -07:00
c5eb072fd3 Fix breakouts from git root during build
Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 7f7ebeffe81760e2e0a711eb480dd0e0e8cf24dc
Component: engine
2015-06-01 22:10:55 +03:00
89782c55eb 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>
Upstream-commit: 81fa9feb0cdc0773eff99d7393c16271e84aac08
Component: engine
2015-05-21 20:34:17 -07:00
045dd55a7d 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>
Upstream-commit: ca6722f1c5e4e2017a71e33579d91ac0d9ea2a25
Component: engine
2015-05-20 12:21:17 -07:00
a9af2bce60 Move WriteFlusher out of utils into ioutils
Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
Upstream-commit: 223d6de728ac5df5394b4990f81a466c858d519c
Component: engine
2015-05-08 12:33:33 -06:00
a0ae4df58b Use git url fragment to specify reference and dir context.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 49fd83a25e2e6604014de41d4f4099a7bc07a09b
Component: engine
2015-05-04 09:28:06 -07:00
dfd9ef2b64 Remove duplicated git clone logic.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 1cfb307d70558110e8e88a7391ae0e6cf6ebf174
Component: engine
2015-04-24 09:39:45 -07:00
fdf9a8d629 Remove job from container_inspect
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 4b9fe9c298c8778855c1d14e978c791496dd7c42
Component: engine
2015-04-23 00:58:13 +02:00
1edadd0f1c 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>
Upstream-commit: 3b05005a1262e53d042512e88c52a6dae0f2e93d
Component: engine
2015-04-20 14:25:45 -07:00
a4111cba55 Refactor utils/utils, fixes #11923
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: c30a55f14dbbe3971ba0ac716ba69a60868f4490
Component: engine
2015-04-14 01:37:36 +02:00
d6a743bd91 Merge pull request #12044 from reteptilian/11721-remove-randomstring-3
fixes 11721 replace stringutils.GenerateRandomString with stringid.GenerateRandomID
Upstream-commit: b5c3d01e6b5d06ba3e477a71acf92ec564b279e6
Component: engine
2015-04-13 13:47:50 -07:00
0551904b7c 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>
Upstream-commit: ca37301d54e1525d4522dea266180072d4fd892b
Component: engine
2015-04-11 13:31:34 -04:00
31f1448b86 Refactor ultis/utils_daemon, fixes #11908
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 01724c1cf11ce4a9e3b1978c7c07fd25656ed137
Component: engine
2015-04-03 20:20:04 +02:00
64b84b5716 Fixes #11721 removed GenerateRandomString
Signed-off-by: Peter Esbensen <pkesbensen@gmail.com>

gofmt

Signed-off-by: Peter Esbensen <pkesbensen@gmail.com>
Upstream-commit: 6896016b7c7a95ac33c77a222c359cf35a471eb9
Component: engine
2015-04-02 08:07:52 -07:00
f6752519af Merge pull request #11893 from runcom/11892-refactor-utils-flags
Refactor utils/flags.go
Upstream-commit: 00a15227f8c7679a4a5c1f90e61367a3d1be92df
Component: engine
2015-03-30 13:35:40 -07:00
f3f4c403c1 Merge pull request #11900 from runcom/11899-refactor-utils-http
Refactor utils/http.go
Upstream-commit: 70a479dda5e2f99ac141853c2a8527a026c1da6f
Component: engine
2015-03-30 13:11:45 -07:00
a62098f98e Refactor utils/http.go, fixes #11899
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 0995ab5946b068a14cba05be8b2693c4181097e3
Component: engine
2015-03-30 17:59:57 +02:00
342d42b5a5 Refactor utils/tmpdir.go, fixes #11905
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: f1bbc1f34f98529f352130b5985ae5763e5b9c2e
Component: engine
2015-03-29 20:56:07 +02:00
0f80e9e5da Refactor utils/flags.go, fixes #11892
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 5670c6c6954e08575a6c821137a7ea6d9084af93
Component: engine
2015-03-29 03:22:46 +02:00
e5b36a723c Replace aliased imports of logrus, fixes #11762
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 6f4d847046cb4e072de61d042c0266190d73a8c9
Component: engine
2015-03-26 23:22:04 +01:00
0ee1e9f604 Fixes hacks from progressreader refactor
related to #10959

Signed-off-by: bobby abbott <ttobbaybbob@gmail.com>
Upstream-commit: 0cd6c05d8112e9246b734107d54e2855e3d5fec5
Component: engine
2015-03-25 18:21:02 -07:00
e0fdaa87e8 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>
Upstream-commit: 772833274fd84b3c960ccab14258b7e5a00b18cd
Component: engine
2015-03-24 23:59:32 +01:00
1e47557825 Refactor pkg/common, Fixes #11599
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: b80fae735684406d848b16a0f148a746e17ed25f
Component: engine
2015-03-24 18:19:59 +01:00
d6d379e87a 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>
Upstream-commit: a2b0c9778feac970524b98ef7a91b5528fdeb9d5
Component: engine
2015-03-17 10:10:42 +00:00
2479608ad5 Merge pull request #10977 from robertabbott/10959-progressreader
Moves progressreader from utils to its own package
Upstream-commit: 8ae20d8eba127361bc07260580e2d3b8e3628c3e
Component: engine
2015-03-16 12:45:33 -07:00
b06c1f22f7 Make utils_daemon and volumes cross-platform compileable.
Signed-off-by: Rik Nijessen <riknijessen@gmail.com>
Upstream-commit: 1ec2eac50db2c98e00a488664625a22bf3757066
Component: engine
2015-03-16 11:46:07 +01:00
6283bdf158 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>
Upstream-commit: 12b278d3540bc32699e8c2197b556188fd98b77b
Component: engine
2015-03-11 00:50:27 -07:00
459803f719 Move directory size calculation to pkg/ (fixes #10970)
Signed-off-by: Martijn Dwars <ikben@martijndwars.nl>
Upstream-commit: e2b8933d213b283578babc1d86538950295e4fc7
Component: engine
2015-03-04 21:16:31 +01:00
2d06b1cf02 Merge pull request #11017 from brahmaroutu/random_10962
moving random.go from utils
Upstream-commit: f5850e8e30b9420d26bd12136d8bbb6669d1e2bb
Component: engine
2015-02-26 21:35:42 -05:00
e051d5c51d moving random.go from utils
Closes #10962
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 53ece336dcab8e778fc37afc7a264f7d168110ff
Component: engine
2015-02-26 18:31:18 +00:00
88b1d37e3b Move TimeoutConn to seperate pkg dir.
Fixes #10965
Signed-off-by: Rik Nijessen <riknijessen@gmail.com>
Upstream-commit: 690a85797e70c3816a1dec768bff0c454e1e23a9
Component: engine
2015-02-25 17:09:47 +01:00
bdb65abebf Removing dependencies from pkg into Docker internal code
Closes #10922

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

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 6871b9b16afe46e7566ac2937246b4a64be97269
Component: engine
2015-02-20 05:40:12 +00:00
a251ace79f Merge pull request #10208 from mota/fix-env-writerto
Fix env.WriteTo count return
Upstream-commit: 6d65fa1faa4770b5e7930da8f9e8bd82be539475
Component: engine
2015-02-06 14:14:16 -08:00
0d4aa9a72d Add key migration to daemon
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 007ef161b45dd91afcfb7ef9cd32e6c88dbf196e
Component: engine
2015-01-21 16:55:05 -08:00
32b5682b75 Merge pull request #10145 from duglin/Issue10141
Docker run -e FOO should erase FOO if FOO isn't set in client env
Upstream-commit: edaf23b7a7f71626bdafb4e3a9677ad05fa17cab
Component: engine
2015-01-21 14:16:51 -08:00
a5f51dc24e Fix env.WriteTo count return
Some calls like json.Encoder.Encode mask the number of bytes written to
an io.Writer. The solution provides a wrapper io.Writer around the
actual io.Writer that allows multiple calls to Write to be considered as
one and allow access to this count.

Signed-off-by: Pierre Wacrenier <pierre.wacrenier@gmail.com>
Upstream-commit: 0cd30cf3991de1b491cac3c0cecdc976f0098f29
Component: engine
2015-01-21 01:14:23 +01:00
b098aaedce Merge pull request #9784 from dmcgowan/v2-registry
Client Support for Docker Registry HTTP API V2
Upstream-commit: 8b95ad230e2ee76450ceb9a80aa8e942a56bb397
Component: engine
2015-01-19 10:46:38 -08:00
5d2fe159f4 Docker run -e FOO should erase FOO if FOO isn't set in client env
See #10141 for more info, but the main point of this is to make sure
that if you do "docker run -e FOO ..." that FOO from the current env
is passed into the container.  This means that if there's a value, its
set.  But it also means that if FOO isn't set then it should be unset in
the container too - even if it has to remove it from the env.  So,
   unset HOSTNAME
   docker run -e HOSTNAME busybox env
should _NOT_ show HOSTNAME in the list at all

Closes #10141

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 9ab73260f8e4662e7321b257c636928892f023cf
Component: engine
2015-01-19 08:00:32 -08:00
6136e835bf Fix "-X" 6l usage ("define string data")
It turns out "-X" is only for strings! :)

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
Upstream-commit: da01690a0a22ced060d4fb4fc46cb545ff1604df
Component: engine
2015-01-16 21:46:01 -07:00
2a0f9941dc Fix tests
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: 7eeda3f14de744b98b1c5aca4f2ecce87a479baa
Component: engine
2015-01-15 14:05:05 -08:00
bd2dadaee1 Update push and pull to registry 2.1 specification
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: 0336b0cdaa74ac03003c4a933eb866fb0cec8125
Component: engine
2015-01-15 14:05:05 -08:00
287a9987a0 Fix docker run/exec/create not printing error messages
If an error message happens while parsing docker run or docker exec, the message
is not being printed out.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: 12a7e78b125afd277adb7cd099817a419f4faaa0
Component: engine
2015-01-13 09:23:13 -05:00
d3407c8087 Merge pull request #8456 from lindenlab/cleanup-repository-info
Cleanup: Replace ResolveRepositoryName with RepositoryInfo{}
Upstream-commit: 6870bde5847d4484d87f91baf58edc52f575ea5d
Component: engine
2015-01-08 17:19:03 -05:00
8404235dd8 Merge pull request #9648 from estesp/9202-update-resolvconf
Update container resolv.conf when host network changes /etc/resolv.conf
Upstream-commit: 92af1f014520b4f75a6220478b01ed6a02ca5bfb
Component: engine
2015-01-08 14:06:55 -08:00
5aa04a56fb Deprecating ResolveRepositoryName
Passing RepositoryInfo to ResolveAuthConfig, pullRepository, and pushRepository

Moving --registry-mirror configuration to registry config

Created resolve_repository job

Repo names with 'index.docker.io' or 'docker.io' are now synonymous with omitting an index name.

Adding test for RepositoryInfo

Adding tests for opts.StringSetOpts and registry.ValidateMirror

Fixing search term use of repoInfo

Adding integration tests for registry mirror configuration

Normalizing LookupImage image name to match LocalName parsing rules

Normalizing repository LocalName to avoid multiple references to an official image

Removing errorOut use in tests

Removing TODO comment

gofmt changes

golint comments cleanup.  renaming RegistryOptions => registry.Options, and RegistryServiceConfig => registry.ServiceConfig

Splitting out builtins.Registry and registry.NewService calls

Stray whitespace cleanup

Moving integration tests for Mirrors and InsecureRegistries into TestNewIndexInfo unit test

Factoring out ValidateRepositoryName from NewRepositoryInfo

Removing unused IndexServerURL

Allowing json marshaling of ServiceConfig.  Exposing ServiceConfig in /info

Switching to CamelCase for json marshaling

PR cleanup; removing 'Is' prefix from boolean members.  Removing unneeded json tags.

Removing non-cleanup related fix for 'localhost:[port]' in splitReposName

Merge fixes for gh9735

Fixing integration test

Reapplying #9754

Adding comment on config.IndexConfigs use from isSecureIndex

Remove unused error return value from isSecureIndex

Signed-off-by: Don Kjer <don.kjer@gmail.com>

Adding back comment in isSecureIndex

Signed-off-by: Don Kjer <don.kjer@gmail.com>
Upstream-commit: 568f86eb186731b907b659e4ec64bda21c2fe31d
Component: engine
2015-01-08 20:14:58 +00:00
ae1406d798 Update container resolv.conf when host network changes /etc/resolv.conf
Only modifies non-running containers resolv.conf bind mount, and only if
the container has an unmodified resolv.conf compared to its contents at
container start time (so we don't overwrite manual/automated changes
within the container runtime). For containers which are running when
the host resolv.conf changes, the update will only be applied to the
container version of resolv.conf when the container is "bounced" down
and back up (e.g. stop/start or restart)

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 63a7ccdd2372d87f56f7a86da07c72ea51332c2a
Component: engine
2015-01-08 14:15:13 -05:00