Skip to content
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 images are built even if there is no changes in corresponding Dockerfiles #507

Closed
lde-avaleo opened this issue Feb 5, 2021 · 12 comments · Fixed by #510
Closed

Docker images are built even if there is no changes in corresponding Dockerfiles #507

lde-avaleo opened this issue Feb 5, 2021 · 12 comments · Fixed by #510
Assignees
Labels
Milestone

Comments

@lde-avaleo
Copy link

Hi Guys!

Last year I've reported some anoying behaviour with dockerhub images releases: #307

Has something changed recently as I noticed images are build almost every day????

regards

@lde-avaleo
Copy link
Author

This is how renovate PR looks like since some time making it unusable...

image (6)

@bharathappali
Copy link
Collaborator

Has something changed recently as I noticed images are build almost every day????

Can you please point to a specific build where you noticed this ?

@lde-avaleo
Copy link
Author

I've noticed it in docker hub where apline-jre image is getting new hash every day. It means that new image was published to dockerhub. I'm guessing that images are published by your build process.

@karianna
Copy link
Member

CC @gdams - pretty sure our pipelines don't do this unless this happened as part of a GH actions shift?

@gdams
Copy link
Member

gdams commented Feb 12, 2021

Yeah, we update the docker images daily. This is to pull in OS security updates etc.

@bharathappali
Copy link
Collaborator

I might be wrong but in the logs i see this

INFO: Building adoptopenjdk/openjdk11 x86_64-alpine-jre-11.0.10_9 from 11/jre/alpine/Dockerfile.hotspot.releases.full ...
INFO: Checking when the adopt docker image x86_64-alpine-jre-11.0.10_9adoptopenjdk/openjdk11:x86_64-alpine-jre-11.0.10_9 was built ...
INFO: AdoptOpenJDK docker image for x86_64-alpine-jre-11.0.10_9adoptopenjdk/openjdk11:x86_64-alpine-jre-11.0.10_9 does not exist. Docker build needed

From the scripts i see

function check_adopt_image_available() {
        local tag=$1

        echo "INFO: Checking when the adopt docker image ${tag} was built ..."
        if ! docker pull "${tag}" &>/dev/null; then
                # Adopt image not available currently, build needed
                echo "INFO: AdoptOpenJDK docker image for ${tag} does not exist. Docker build needed"
                build_needed=1
                return;
        fi
}

The tag var passed to the function should be ideally adoptopenjdk/openjdk11:x86_64-alpine-jre-11.0.10_9 but x86_64-alpine-jre-11.0.10_9adoptopenjdk/openjdk11:x86_64-alpine-jre-11.0.10_9 is getting passed (the tag part is getting prepended to the image name). I feel that the docker pull for x86_64-alpine-jre-11.0.10_9adoptopenjdk/openjdk11:x86_64-alpine-jre-11.0.10_9 fails so the build is getting generated everytime and the images are being updated.

I feel this was the issue for images getting built daily. Please correct me if I'm wrong.

@gdams
Copy link
Member

gdams commented Feb 15, 2021

@dinogun any thoughts?

@dinogun
Copy link
Collaborator

dinogun commented Feb 16, 2021

It appears to me that the recent summary tag changes might have caused this breakage, @bharathappali is investigating and is close to a PR.

@lde-avaleo
Copy link
Author

Hmmm I think the issue is stille there. Images where published to docker hub yesterday and today.

@karianna karianna reopened this Feb 18, 2021
@karianna
Copy link
Member

@bharathappali Can you review?

@bharathappali
Copy link
Collaborator

bharathappali commented Feb 18, 2021

@lde-avaleo I have raised a new issue stating this #511. It will be fixed in #512 I'm working on it. Will keep it updated.

@lde-avaleo
Copy link
Author

Hi Guys!

Any news regarding this one? The issue is still there...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants