docker / scout-cli

Docker Scout CLI
https://docker.com/products/docker-scout
Other
250 stars 60 forks source link

I cannot record an image to an environment (Windows) #88

Closed jeromebaude closed 5 months ago

jeromebaude commented 5 months ago

Environment:

How to reproduce:

PS C:\Users\Jerome\WORKDIR\my-tweet-app-docker> docker scout environment production jeromebaude/my-tweet-app-docker:v2 --org jeromebaude ! 'docker scout environment' is experimental and its behaviour might change in the future v Successfully recorded jeromebaude/my-tweet-app-docker:v2 in environment production

PS C:\Users\Jerome\WORKDIR\my-tweet-app-docker> docker scout environment production --org jeromebaude ! 'docker scout environment' is experimental and its behaviour might change in the future No image recorded to environment production in organization jeromebaude

What's wrong?

cdupuis commented 5 months ago

@jeromebaude thanks for raising this.

The environment command currently has a UX issue around how it handles local images vs images from a registry. I assume jeromebaude/my-tweet-app-docker:v2 is an image that have you locally (you can check when running docker images). If so, you are recording the local image digest in the production environment but because the Scout backend has no knowledge about this local image it does not return it when you try to list the images in production.

A way to solve this to explicitly register the registry version of jeromebaude/my-tweet-app-docker:v2 by running docker scout env production registry://jeromebaude/my-tweet-app-docker:v2 --org jeromebaude.

Let me know if this fixes this issue for you?

jeromebaude commented 5 months ago

Hi @cdupuis, My image jeromebaude/my-tweet-app-docker:v2 is local as well as stored in Docker Hub. By running docker scout env production registry://jeromebaude/my-tweet-app-docker:v2 --org jeromebaude it is recorded as part of my production env. Thank you