Docker Community Forums

Share and learn in the Docker community.

Tag v2.0.1 build is not good but latest tag build is good even though same code

Hello team,

I am have created a customized jenkins using centos docker and storing in docker hub.
When latest tag docker build is good, but release-2.0.1 docker build is not good even though code of latest tag and release-2.0.1 is same.

My docker link : https://cloud.docker.com/u/bitroid/repository/docker/bitroid/centosjenkins

Can you please and advice on this behaviour.

Thanks,
Hemanth.

Hi.

Those 2 images are totally different in size, and they were created over a day apart.

Pull bitroid/centosjenkins:latest

Last login: Fri Feb 15 07:48:58 on ttys000
🐳  gforghetti:[~] $ docker image pull bitroid/centosjenkins:latest
latest: Pulling from bitroid/centosjenkins
a02a4930cb5d: Pull complete
c702ea4a22bc: Pull complete
a811946ee73e: Pull complete
0eed984e619d: Pull complete
edde8a9b47d0: Pull complete
Digest: sha256:18381ee296f250f1658dde62f023428cdadafdb9388df8ea8cfe14a2334150aa
Status: Downloaded newer image for bitroid/centosjenkins:latest

Pull bitroid/centosjenkins:release-2.0.1

Notice it is not the same image as bitroid/centosjenkins:latest because Docker pulled it.
If it was the same image, the Digets (sha’s) would be the same and Docker would have used the image already downloaded.

🐳  gforghetti:[~] $ docker image pull bitroid/centosjenkins:release-2.0.1
release-2.0.1: Pulling from bitroid/centosjenkins
a02a4930cb5d: Already exists
c702ea4a22bc: Already exists
f081492e4567: Pull complete
d67f511c99d1: Pull complete
10a4f10d7aaa: Pull complete
Digest: sha256:255aca7c1bcc5c0785d9fd737fe945424a691fcdbef4efb34456395a70dc6613
Status: Downloaded newer image for bitroid/centosjenkins:release-2.0.1

Display the create date/time and size of bitroid/centosjenkins:latest

🐳  gforghetti:[~] $ docker image inspect bitroid/centosjenkins:latest --format '{{ printf "Date Created: %s\n" .Created }}{{ printf "Size: %d\n" .Size }}'
Date Created: 2019-02-14T03:31:55.205853009Z
Size: 1132108674

Display the create date/time and size of bitroid/centosjenkins:release-2.0.1

🐳  gforghetti:[~] $ docker image inspect bitroid/centosjenkins:release-2.0.1 --format '{{ printf "Date Created: %s\n" .Created }}{{ printf "Size: %d\n" .Size }}'
Date Created: 2019-02-15T07:03:32.742926166Z
Size: 834878563

They are different.

Hello @gforghetti,

I agree that build happened on different date, but master source code and v2.0.1 tag code is same.
Docker tag with latest build is good but docker tag with release-2.0.1 is bad even though it complete without any failure.

Can you please check and advice why this difference in build even though dockerfile code is same.

latest tag docker file code link: https://github.com/hemanth22/CentOSJenkins

release-2.0.1 tag docker file code link: https://github.com/hemanth22/CentOSJenkins/tree/v2.0.1

If you see the master and v2.0.1 last commit in github, it is same.

Can you please check and advice.

Thanks,
Hemanth.

Hi.

I recommend that you compare the master code branch and the v2.0.1 tag.
If both are the same, then I recommend that you re-build the v2.0.1 docker image.
Then display the size of the v2.0.1 docker image like I did in my previous post.
I suspect that something “happened” during the build or push to Docker Hub the latest time you did this.

After multiple times rebuild it worked fine.

Thanks,
Hemanth.