Commit Graph

13 Commits

Author SHA1 Message Date
be83c11fb0 Add canonical import comment
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 4f0d95fa6ee7f865597c03b9e63702cdcb0f7067
Component: engine
2018-02-05 16:51:57 -05:00
957a7e39a2 pkg: remove random package
The unnecessary `random` package has been removed in favor of using the
`math/rand` package directly. Seeding of the random value from crypto
has been added to the `stringid` package to account for the change.

May need to add an equivalent seed to `namesgenerator`, but this is
often used with `stringid` and has collision protection.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 66cfe61f71252f528ddb458d554cd241e996d9f1
Component: engine
2017-05-08 17:02:02 -07:00
42b7611762 Move imageID validation to stringid pkg
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 9f3046f9a03f1a710bdb7fcddd37ff50e71e31c3
Component: engine
2016-12-26 18:53:22 -08:00
9afdf020b7 Minor refactor and beter coverage for pkg/stringid
This slightly simplifies TruncateID() by only
trimming the string if needed.

Also improved unit-tests for this package;

- Add a test for GenerateNonCryptoID()
- Add a test for shortening a sha-256 ID
- Make TestShortenId() more "unit", by using a fixed string, instead of calling GenerateRandomID()

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 78eab14d0b2128ffaff2b3c0cd32c5339ef35ad7
Component: engine
2016-07-20 00:23:06 +02:00
f4582c23f4 fix typos in pkg
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: aef02273d9cdf8144b95c9c9a8d1e119d24b2d9d
Component: engine
2016-04-09 21:18:15 +08: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
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
7130322c52 Fix golint warnings
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 270e8cf64dee586240968900fb1cf8e36ed641a5
Component: engine
2015-11-02 08:02:25 -08:00
5ca33487e4 Add GenerateNonCryptoID function to avoid entropy exhaustion
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 4553b6af4badd3e182204ed2178348b894688460
Component: engine
2015-07-28 22:31:01 -07:00
2db54e3ac2 Lint on pkg/* packages
- pkg/useragent
- pkg/units
- pkg/ulimit
- pkg/truncindex
- pkg/timeoutconn
- pkg/term
- pkg/tarsum
- pkg/tailfile
- pkg/systemd
- pkg/stringutils
- pkg/stringid
- pkg/streamformatter
- pkg/sockets
- pkg/signal
- pkg/proxy
- pkg/progressreader
- pkg/pools
- pkg/plugins
- pkg/pidfile
- pkg/parsers
- pkg/parsers/filters
- pkg/parsers/kernel
- pkg/parsers/operatingsystem

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 18c7c67308bd4a24a41028e63c2603bb74eac85e
Component: engine
2015-07-27 21:26:21 +02:00
5de033afb0 pkg/stringid: precompile regexp
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: cb08c1173fae541742af3c8329e00904edef48df
Component: engine
2015-05-13 21:48:48 +03:00
3f75ea937e Only use fallback to short IDs when obvious.
As reported in #11294, the Docker daemon will execute contains it
shouldn't run in the event that a requested tag is present in an image's
ID. This leads to the wrong image being started up silently.

This change reduces the risk of such a collision by using the short ID
iff the actual revOrTag looks like a short ID (not that it necessarily
is).

Signed-off-by: Richard Burnison <rburnison@ebay.com>
Upstream-commit: 8d1a500303a9dd892301e343c94821207c715fbb
Component: engine
2015-04-10 13:20:44 -04: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