-
Notifications
You must be signed in to change notification settings - Fork 18.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker stack deploy creates no tags #31574
Comments
Perhaps the documentation needs to be enhanced on this part. What's happening when deploying a service (or stack), is that docker resolves the digest (immutable reference) of the image you specified. Doing so, guarantees that every instance of the service runs exactly the same image. "tags" are mutable, so for example, the When pulling an image by digest ( It was discussed at some occasions to automatically tag the image after it was pulled by digest, if the original image was specified by /cc @dmcgowan @aaronlehmann ^^ |
Ah ok, that clarifies a lot, but there is another hassle with that:
To see that the container is the one started off of the image is really difficult. Where the service ls shows the image with tag. |
@thaJeztah This might be as simple as preserving the tag in the digest-qualified reference. For example, something like this:
@nishanttotla Is this an easy fix? |
@stevvooe: We do preserve the tag in the reference, but we do not overwrite the tag in the local node's reference store, because this might be an unexpected side effect of running a service. For example, let's say I set up a service Perhaps as a compromise we could create the tag if it does not exist locally, but avoid overwriting any existing tags? |
@aaronlehmann Understood. Could we populate this field in |
I believe we do. |
Somehow no, the running tag doesn't get shown on ps |
Ah, you're right. I think this is a known issue in currently released versions because the forked version of the reference package couldn't handle both a tag and a digest. I just tried on master, and while we remove the digest by default for readability (#30848), |
@aaronlehmann @aluzzardi I can see the tag on
|
@aaronlehmann @nishanttotla Oh, I believe we're both right. It shows the tag unless you use
|
@aluzzardi that doesn't look right, because you can see the digest without I believe you might have tested on a slightly older commit. I get exactly the same behavior with |
That was from the latest release, not master. Has this been fixed on master? |
@aluzzardi yes, it has. |
@nishanttotla @aaronlehmann Can this one as well as #31656 be closed? Do we need to backport to 17.03? |
I suggest not backporting. It's not a high priority issue, and I think the fix in master depended on the new reference package (which was an enormous PR). But I don't think we should close this issue, since it's about whether services should create tags. |
Maybe this is a duplicate of #28908 though? |
I recently noticed the issue of the missing tag but I am not using |
@styfle this does not only apply to the |
@thaJeztah Thanks for the clarification. It sounds like @nishanttotla said this is fixed in master. I'm currently using Docker CE 17.03.1-ce-win5 (10743)...how can I install the latest Windows version to confirm this is fixed? Or if there is no nightly build, when is the next docker release expected? |
From above it looks like the services in a compose file should reference image by digest, not tag. So I'm trying like this:
I'm authenticated with ECS, but I get 'Rejected... Image Not Found' errors on deploy. |
@hierozbosch if ECS does not support pulling by digest, their registry does not comply with the specs; in that case I suggest opening a ticket with them. In docker 17.06 you can disable resolving the image digest with the |
Thanks @thaJeztah. ECS does indeed support the pull-by-digest according to spec. The problem was me using the wrong digest: I got it from the image I pushed up to ECS (using |
Any news ? |
This creates a minor annoyance with Consider this example where I've deployed traefik via a stack:
This fails as expected because without a tag,
This works, obviously:
I was hoping this wouldn't fail, but it does:
@thaJeztah any thoughts? It looks like the code for the |
I understand what after Example in my case: REPOSITORY TAG IMAGE ID CREATED SIZE `docker images -a REPOSITORY TAG IMAGE ID CREATED SIZE 49 images `docker images -f "dangling=true" REPOSITORY TAG IMAGE ID CREATED SIZE 43 images I have 5 stacks (3 stacks of 3 services each, 1 stack of 4 services, 1 stack of 1 service) of just 14 services without scale setting (14 containers)) What images unused? |
@Kotnstantin would |
Hi, I want to change my docker-compose files to version 3, so I tried it with an example:
Steps to reproduce the issue:
Describe the results you received:
Describe the results you expected:
Output of
docker version
:Output of
docker info
:The text was updated successfully, but these errors were encountered: