MCPcopy
hub / github.com/docker/compose / imagesOnly

Function imagesOnly

cmd/compose/config.go:257–266  ·  view source on GitHub ↗

imagesOnly return project with all attributes removed but service.images

(project *types.Project)

Source from the content-addressed store, hash-verified

255
256// imagesOnly return project with all attributes removed but service.images
257func imagesOnly(project *types.Project) *types.Project {
258 digests := types.Services{}
259 for name, config := range project.Services {
260 digests[name] = types.ServiceConfig{
261 Image: config.Image,
262 }
263 }
264 project = &types.Project{Services: digests}
265 return project
266}
267
268func runConfigNoInterpolate(ctx context.Context, dockerCli command.Cli, opts configOptions, services []string) ([]byte, error) {
269 // we can't use ToProject, so the model we render here is only partially resolved

Callers 1

runConfigInterpolateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected