SHA different when should be the same

I am struggling because I have 2 containers that should be the exact same but yet they have different SHA256. I looked and the ruby version was the same and the gem installs were the same. So it really seems like it should be the same SHA256. However one container is using high CPU after being on for a while when the other one is not. So my question is to know if there is a way to find the difference between 2 containers. I ran docker diff, I ran container-diff, I ran docker-diff.

So in short, I want to know why 2 containers with same dockerfiles and same application files have a diff. sha.

If you have a modern client and server, you could try something like

$ docker manifest inspect

which would give you a layer-by-layer digest which you could compare between the two images.

The other thing you might want to look at is the Dockerfile itself. If you’ve specified the tag “latest” or not given an explicit tag in your image name(s), two different builds may well have different base layers.

So I have no diff. in the layers. the configs size are different.

I do have different tags. But you are thinking if the layers have no diffs then the docker container is the same?

What is the config part of the manifest?