We are trying to speed up startup time of apps based on
containers/image regex takes some time on every start
when in init. Moving this to a sync.Once should not
effect any change on the system.
Only changing internal regexp, since changing external would be a
breaking change to the library.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Improve the code such that a given raw regex string is compiled only
once.
Before:
init 1341880 bytes, 11453 allocs
After:
init 485600 bytes, 4501 allocs
Copied-from: distribution/distribution/pull/3566
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This replaces the copy of github.com/docker/docker/reference in the same
place, which we have just gotten rid of, and allows using this package
even in consumers which insist on an incompatible version of
docker/distribution.
The copy has been edited to drop a reference to
github.com/docker/distribution/digestset .
Signed-off-by: Miloslav Trmač <mitr@redhat.com>