compose/pkg/api
Sebastiaan van Stijn 8caa6f1f3e
pkg/api: replace uuid for basic random id
The uuid package in distribution was created as a utility for the distribution
project itself, to cut down external dependencies (see [1][1]).

For compose, this has the reverse effect, as it now brings all the dependencies
of the distribution module with it.

This patch switches to the uuid generation to crypto/rand to produce a random
id. I was considering using a different uuid implementation, or docker's
"stringid.GenerateRandomID", but all of those are doing more than needed,
so keep it simple.

Currently, this change has little effect, because compose also uses the
distribution module for other purposes, but the distribution project is
in the process of moving the "reference" package to a separate module,
in which case we don't want to depend on the distribution module only for
the uuid package.

[1]: 36e34a55ad

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-31 10:13:32 +02:00
..
api.go add support for attributes exposed by `docker ps` 2023-08-25 16:36:45 +02:00
api_test.go move compose API into pkg/api 2021-06-15 15:52:48 +02:00
dryrunclient.go pkg/api: replace uuid for basic random id 2023-08-31 10:13:32 +02:00
errors.go Add gocritic to linters 2022-07-13 19:33:03 +02:00
errors_test.go move compose API into pkg/api 2021-06-15 15:52:48 +02:00
io.go don't assume os.Stdout and rely on dockerCLI.streams 2022-12-20 23:52:25 +01:00
labels.go detect replacement container is created and inform printer so it attach and don't stop 2023-02-06 11:23:13 +01:00
proxy.go fix some comments 2023-07-04 11:34:49 +08:00